Re: [PATCH] bcache: dont reset bio opf in bch_data_insert_start

2021-01-28 Thread Dongsheng Yang
Hi Christoph, 在 2021/1/28 星期四 下午 5:10, Dongsheng Yang 写道: Hi Christop: 在 2021/1/28 星期四 上午 1:37, Christoph Hellwig 写道: But the old code is also completely broken.  We can't just OR in the op, as that implicitly assumes the old op was 0 (REQ_OP_READ). Yes, indeed, there is an assume that the

Re: [PATCH] bcache: dont reset bio opf in bch_data_insert_start

2021-01-28 Thread Dongsheng Yang
Hi Christop: 在 2021/1/28 星期四 上午 1:37, Christoph Hellwig 写道: But the old code is also completely broken. We can't just OR in the op, as that implicitly assumes the old op was 0 (REQ_OP_READ). Yes, indeed, there is an assume that the op is just possible to be 0 (REQ_OP_READ) or 1 (REQ_OP_WRIT

Re: [PATCH] bcache: dont reset bio opf in bch_data_insert_start

2021-01-27 Thread Christoph Hellwig
But the old code is also completely broken. We can't just OR in the op, as that implicitly assumes the old op was 0 (REQ_OP_READ). Please fix this to explicitly set the exact op and flags that you want instead of this fragile magic.

Re: [PATCH] bcache: dont reset bio opf in bch_data_insert_start

2021-01-27 Thread Dongsheng Yang
在 2021/1/26 星期二 下午 12:34, Coly Li 写道: On 1/26/21 12:32 PM, Dongsheng Yang wrote: 在 2021/1/25 星期一 下午 12:53, Coly Li 写道: On 1/25/21 12:29 PM, Dongsheng Yang wrote: commit ad0d9e76(bcache: use bio op accessors) makes the bi_opf modified by bio_set_op_attrs(). But there is a logical problem in t

Re: [PATCH] bcache: dont reset bio opf in bch_data_insert_start

2021-01-26 Thread Coly Li
On 1/26/21 12:32 PM, Dongsheng Yang wrote: > > 在 2021/1/25 星期一 下午 12:53, Coly Li 写道: >> On 1/25/21 12:29 PM, Dongsheng Yang wrote: >>> commit ad0d9e76(bcache: use bio op accessors) makes the bi_opf >>> modified by bio_set_op_attrs(). But there is a logical >>> problem in this commit: >>> >>>  

Re: [PATCH] bcache: dont reset bio opf in bch_data_insert_start

2021-01-26 Thread Dongsheng Yang
在 2021/1/25 星期一 下午 12:53, Coly Li 写道: On 1/25/21 12:29 PM, Dongsheng Yang wrote: commit ad0d9e76(bcache: use bio op accessors) makes the bi_opf modified by bio_set_op_attrs(). But there is a logical problem in this commit: trace_bcache_cache_insert(k); bch_ke

Re: [PATCH] bcache: dont reset bio opf in bch_data_insert_start

2021-01-24 Thread Coly Li
On 1/25/21 12:29 PM, Dongsheng Yang wrote: > commit ad0d9e76(bcache: use bio op accessors) makes the bi_opf > modified by bio_set_op_attrs(). But there is a logical > problem in this commit: > > trace_bcache_cache_insert(k); > bch_keylist_push(&op->insert_keys); >

[PATCH] bcache: dont reset bio opf in bch_data_insert_start

2021-01-24 Thread Dongsheng Yang
commit ad0d9e76(bcache: use bio op accessors) makes the bi_opf modified by bio_set_op_attrs(). But there is a logical problem in this commit: trace_bcache_cache_insert(k); bch_keylist_push(&op->insert_keys); - n->bi_rw |= REQ_WRITE; + bi