Re: [PATCH] btrfs: Fix a C compliance issue

2018-06-20 Thread Bart Van Assche
On Wed, 2018-06-20 at 13:19 -0400, Jeff Mahoney wrote: > The shed should be yellow. > > -Jeff > > diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c > index 891cd2ed5dd4..57c9da0b459f 100644 > --- a/fs/btrfs/super.c > +++ b/fs/btrfs/super.c > @@ -2375,21 +2375,20 @@ static __cold void

[PATCH v2 0/3] Three patches that address static analyzer reports

2018-06-20 Thread Bart Van Assche
Hello Chris and Josef, The three patches in this series address complaints reported by static analyzers (gcc + W=1, sparse, smatch). These patches do not change any functionality. Please consider these for inclusion in the upstream kernel. Thanks, Bart. Bart Van Assche (3): btrfs: Fix

[PATCH v2 2/3] btrfs: Annotate fall-through

2018-06-20 Thread Bart Van Assche
This patch avoids that the compiler complains that a fall-through annotation is missing when building with W=1. Signed-off-by: Bart Van Assche --- fs/btrfs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 81107ad49f3a..3e298f26a383 100644

[PATCH v2 1/3] btrfs: Fix indentation

2018-06-20 Thread Bart Van Assche
This patch avoids that building the BTRFS source code with smatch triggers complaints about inconsistent indenting. Signed-off-by: Bart Van Assche --- fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/ioctl.c | 4 ++-- fs/btrfs/reada.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions

[PATCH v2 3/3] btrfs: Fix a C compliance issue

2018-06-20 Thread Bart Van Assche
. Fixes: 62e855771dac ("btrfs: convert printk(KERN_* to use pr_* calls") Signed-off-by: Bart Van Assche Cc: Jeff Mahoney Cc: David Sterba Cc: Nikolay Borisov --- fs/btrfs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/sup

Re: [PATCH] btrfs: Fix a C compliance issue

2018-06-20 Thread Bart Van Assche
On Mon, 2018-06-18 at 12:31 +0300, Nikolay Borisov wrote: > On 18.06.2018 12:26, David Sterba wrote: > > On Sat, Jun 16, 2018 at 01:28:13PM +0300, Nikolay Borisov wrote: > > > I'd rather not see more printk being added. Nothing prevents from having > > > the fmt string being passed to pr_info. > >

[PATCH] btrfs: Fix a C compliance issue

2018-06-15 Thread Bart Van Assche
. Fixes: 62e855771dac ("btrfs: convert printk(KERN_* to use pr_* calls") Signed-off-by: Bart Van Assche Cc: Jeff Mahoney Cc: David Sterba --- fs/btrfs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 81

Re: [PATCHSET v5] blk-mq: reimplement timeout handling

2018-01-12 Thread Bart Van Assche
On Fri, 2018-01-12 at 14:07 -0700, Jens Axboe wrote: > You're really not making it easy for folks to run this :-) My hope is that the ib_srp and ib_srpt patches will be accepted upstream soon. As long as these are not upstream, anyone who wants to retrieve these patches is welcome to clone

Re: [PATCHSET v5] blk-mq: reimplement timeout handling

2018-01-12 Thread Bart Van Assche
On Tue, 2018-01-09 at 08:29 -0800, Tejun Heo wrote: > Currently, blk-mq timeout path synchronizes against the usual > issue/completion path using a complex scheme involving atomic > bitflags, REQ_ATOM_*, memory barriers and subtle memory coherence > rules. Unfortunatley, it contains quite a few

Re: [PATCH 2/8] blk-mq: protect completion path with RCU

2018-01-09 Thread Bart Van Assche
On Mon, 2018-01-08 at 11:15 -0800, Tejun Heo wrote: > Currently, blk-mq protects only the issue path with RCU. This patch > puts the completion path under the same RCU protection. This will be > used to synchronize issue/completion against timeout by later patches, > which will also add the

Re: [PATCH 8/8] blk-mq: rename blk_mq_hw_ctx->queue_rq_srcu to ->srcu

2018-01-08 Thread Bart Van Assche
On Mon, 2018-01-08 at 11:15 -0800, Tejun Heo wrote: > The RCU protection has been expanded to cover both queueing and > completion paths making ->queue_rq_srcu a misnomer. Rename it to > ->srcu as suggested by Bart. Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com>

Re: [PATCH 7/8] blk-mq: remove REQ_ATOM_STARTED

2018-01-08 Thread Bart Van Assche
Add MQ_RQ_COMPLETE and replace REQ_ATOM_STARTED usages with > blk_mq_rq_state() tests. REQ_ATOM_STARTED no longer has any users > left and is removed. Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> N�r��yb�X��ǧv�^�)޺{.n�+{�n�߲)w*jg����ݢj/���z�ޖ��2�ޙ&�)ߡ�a�����G���h��j:+v���w��٥

Re: [PATCH 6/8] blk-mq: remove REQ_ATOM_COMPLETE usages from blk-mq

2018-01-08 Thread Bart Van Assche
On Mon, 2018-01-08 at 11:15 -0800, Tejun Heo wrote: > After the recent updates to use generation number and state based > synchronization, blk-mq no longer depends on REQ_ATOM_COMPLETE except > to avoid firing the same timeout multiple times. > > Remove all REQ_ATOM_COMPLETE usages and use a new

Re: [PATCH 3/8] blk-mq: replace timeout synchronization with a RCU and generation based scheme

2018-01-08 Thread Bart Van Assche
On Mon, 2018-01-08 at 11:15 -0800, Tejun Heo wrote: > @@ -230,6 +232,27 @@ struct request { > > unsigned short write_hint; > > + /* > + * On blk-mq, the lower bits of ->gstate carry the MQ_RQ_* state > + * value and the upper bits the generation number which is > + *

Re: [PATCH 5/8] blk-mq: make blk_abort_request() trigger timeout path

2018-01-08 Thread Bart Van Assche
On Mon, 2018-01-08 at 11:15 -0800, Tejun Heo wrote: > @@ -156,12 +156,12 @@ void blk_timeout_work(struct work_struct *work) > */ > void blk_abort_request(struct request *req) > { > - if (blk_mark_rq_complete(req)) > - return; > - > if (req->q->mq_ops) { > -

Re: [PATCH 4/8] blk-mq: use blk_mq_rq_state() instead of testing REQ_ATOM_COMPLETE

2018-01-08 Thread Bart Van Assche
ce the tests. This will allow removing > REQ_ATOM_COMPLETE usages from blk-mq. Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com>

Re: [PATCH 3/8] blk-mq: replace timeout synchronization with a RCU and generation based scheme

2018-01-08 Thread Bart Van Assche
On Mon, 2018-01-08 at 11:15 -0800, Tejun Heo wrote: > +static void blk_mq_rq_update_aborted_gstate(struct request *rq, u64 gstate) > +{ > + unsigned long flags; > + > + local_irq_save(flags); > + u64_stats_update_begin(>aborted_gstate_sync); > + rq->aborted_gstate = gstate; > +

Re: [PATCH 1/8] blk-mq: move hctx lock/unlock into a helper

2018-01-08 Thread Bart Van Assche
A minor comment: please consider to reorder these two functions such that the lock function appears first and the unlock function second. Anyway: Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com>

fs_reclaim() deadlock complaint

2017-10-12 Thread Bart Van Assche
Hello, Since I started testing kernel v4.14-rc1 I see a deadlock complaint appearing in the kernel log during boot. Is this a known issue? $ cat /etc/fstab # /dev/mapper/vg-root / btrfs defaults,subvol=@ 0 1 /dev/mapper/vg-boot /boot ext4

Re: [PATCH 06/15] fs: simplify dio_bio_complete

2017-05-24 Thread Bart Van Assche
On Thu, 2017-05-18 at 15:18 +0200, Christoph Hellwig wrote: > Only read bio->bi_error once in the common path. Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to maj

Re: [PATCH 05/15] fs: remove the unused error argument to dio_end_io()

2017-05-24 Thread Bart Van Assche
On Thu, 2017-05-18 at 15:18 +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to

Re: [PATCH 04/15] dm: fix REQ_RAHEAD handling

2017-05-24 Thread Bart Van Assche
o > don't generate it when failing read-ahead requests for similar reasons. > > So remove this special casing and ignore all additional error handling for > REQ_RAHEAD - if this was a real underlying error we'd get a normal read > once the real read comes in. Reviewed-by: Bart

Re: [PATCH 03/15] gfs2: remove the unused sd_log_error field

2017-05-24 Thread Bart Van Assche
On Thu, 2017-05-18 at 15:18 +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to

Re: [PATCH 02/15] scsi/osd: don't save block errors into req_results

2017-05-24 Thread Bart Van Assche
On Thu, 2017-05-18 at 15:17 +0200, Christoph Hellwig wrote: > We will only have sense data if the command exectured and got a SCSI > result, so this is pointless. > > Signed-off-by: Christoph Hellwig > --- > drivers/scsi/osd/osd_initiator.c | 2 +- > 1 file changed, 1 insertion(+),

Re: [PATCH 01/15] nvme-lightnvm: use blk_execute_rq in nvme_nvm_submit_user_cmd

2017-05-24 Thread Bart Van Assche
On Thu, 2017-05-18 at 15:17 +0200, Christoph Hellwig wrote: > Instead of reinventing it poorly. Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel

Re: [PATCH 12/15] block: merge blk_types.h into bio.h

2017-05-18 Thread Bart Van Assche
On Thu, 2017-05-18 at 15:18 +0200, Christoph Hellwig wrote: > We've cleaned up our headers sufficiently that we don't need this split > anymore. Hello Christoph, Request-based drivers need the structure definitions from and the type definitions from but do not need the definition of struct

Re: [RFC PATCH 0/2] Introduce blkdev_issue_flush_no_wait()

2017-05-16 Thread Bart Van Assche
On Tue, 2017-05-16 at 17:39 +0800, Anand Jain wrote: > BTRFS wanted a block device flush function which does not wait for > its completion, so that the flush for the next device can be called > in the same thread. > > Here is a RFC patch to provide the function > 'blkdev_issue_flush_no_wait()',

[PATCH 2/3] block, dm-crypt, btrfs: Introduce bio_flags()

2016-09-14 Thread Bart Van Assche
Introduce the bio_flags() macro. Ensure that the second argument of bio_set_op_attrs() only contains flags and no operation. This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Mike Christie <mchri...@redhat.com> Cc: Ch

[PATCH 1/3] block: Document that bio_op() uses the data type of bio.bi_opf

2016-09-14 Thread Bart Van Assche
Make it clear that the sizeof(unsigned int) expression in BIO_OP_SHIFT refers to the bi_opf member of struct bio. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Mike Christie <mchri...@redhat.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Hannes Reinecke <h..

[PATCH 3/3] block: Improve bio_set_op_attrs() robustness

2016-09-14 Thread Bart Van Assche
<< ... is signed while 1U << ... is unsigned; adding 0U to an integer expression causes it to be promoted to an unsigned type). Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Mike Christie <mchri...@redhat.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Hannes Rein

[PATCH 0/3] block: Improve bio_set_op_attrs() robustness

2016-09-14 Thread Bart Van Assche
Hi Jens, bio_set_op_attrs() does not yet check whether the "op_flags" field overflows into the "op" field. Since adding support for SMR requires to introduce more REQ_* flags I think it is important to have such a check. Hence this patch series. Please consider these patches for inclusion in

Re: [dm-devel] [PATCH 01/35] block/fs/drivers: remove rw argument from submit_bio

2016-01-06 Thread Bart Van Assche
-by: Bart Van Assche <bart.vanass...@sandisk.com> -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html