Re: [PATCH 08/19] block: Introduce request_queue.initialize_rq_fn()

2017-05-28 Thread Christoph Hellwig
Oh, and btw - for the mq case we don't want to use the function pointer directly in the queue, but in blk_mq_ops, so that we have all the mq methods in one place.

Re: [PATCH 09/19] block: Make scsi_req_init() calls implicit

2017-05-28 Thread Christoph Hellwig
On Thu, May 25, 2017 at 11:43:17AM -0700, Bart Van Assche wrote: > Instead of explicitly calling scsi_req_init(), let > blk_get_request() call that function from inside blk_rq_init(). > Add an .initialize_rq_fn() callback function to the block drivers > that need it. Merge the IDE .init_rq_fn()

Re: [PATCH 1/3] cfq-iosched: Mark cfq_clear_cfqq_*() as __maybe_unused

2017-05-28 Thread Christoph Hellwig
On Fri, May 26, 2017 at 02:22:35PM -0700, Matthias Kaehlcke wrote: > This fixes the following warning when building with clang: > > block/cfq-iosched.c:449:1: error: unused function 'cfq_clear_cfqq_sync' > [-Werror,-Wunused-function] > > Signed-off-by: Matthias Kaehlcke

[PATCH 15/22] fs: switch ->s_uuid to uuid_t

2017-05-28 Thread Christoph Hellwig
For some file systems we still memcpy into it, but in various places this already allows us to use the proper uuid helpers. More to come.. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Acked-by: Mimi Zohar  (Changes to

[PATCH 17/22] partitions/ldm: switch to use uuid_t

2017-05-28 Thread Christoph Hellwig
And the uuid helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko --- block/partitions/ldm.c | 10 +- block/partitions/ldm.h | 6 ++ 2 files changed, 7 insertions(+),

[PATCH 20/22] scsi_debug: switch to uuid_t

2017-05-28 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko --- drivers/scsi/scsi_debug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/scsi_debug.c

[PATCH 22/22] MAINTAINERS: add uuid entry

2017-05-28 Thread Christoph Hellwig
I'll keep maintaining whatever little changed we need here, with Andy as my designated reviewer. Signed-off-by: Christoph Hellwig --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 053c3bdd1fe5..660c14729205 100644 ---

[PATCH 19/22] nvme: switch to uuid_t

2017-05-28 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko --- drivers/nvme/host/fabrics.c | 8 drivers/nvme/host/fabrics.h | 2 +- drivers/nvme/host/fc.c | 3 +--

[PATCH 16/22] overlayfs: use uuid_t instead of uuid_be

2017-05-28 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko --- fs/overlayfs/copy_up.c | 2 +- fs/overlayfs/overlayfs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 14/22] ima/policy: switch to use uuid_t

2017-05-28 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Acked-by: Mimi Zohar Reviewed-by: Andy Shevchenko --- security/integrity/ima/ima_policy.c | 11 +-- 1 file changed, 5

[PATCH 13/22] block: remove blk_part_pack_uuid

2017-05-28 Thread Christoph Hellwig
This helper was only used by IMA of all things, which would get spurious errors if CONFIG_BLOCK is disabled. Just opencode the call there. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Acked-by: Mimi Zohar Reviewed-by:

[PATCH 21/22] tmpfs: generate random sb->s_uuid

2017-05-28 Thread Christoph Hellwig
From: Amir Goldstein This is used by overlayfs to encode intrasystem unique file handles. Suggested-by: Miklos Szeredi Cc: Hugh Dickins Cc: Andrew Morton Signed-off-by: Amir Goldstein

[PATCH 18/22] sysctl: switch to use uuid_t

2017-05-28 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko --- kernel/sysctl_binary.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sysctl_binary.c

Re: [PATCH v2 0/8] blk-mq: fix & improve queue quiescing

2017-05-28 Thread Ming Lei
On Sat, May 27, 2017 at 09:32:02PM +, Bart Van Assche wrote: > On Sat, 2017-05-27 at 22:21 +0800, Ming Lei wrote: > > There are some issues in current blk_mq_quiesce_queue(): > > > > - in case of direct issue or BLK_MQ_S_START_ON_RUN, dispatch won't > > be prevented after

Re: [PATCH 18/19] block: Constify disk_type

2017-05-28 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH 14/19] block: Add a comment above queue_lockdep_assert_held()

2017-05-28 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH 13/19] blk-mq: Fix the comment above blk_mq_quiesce_queue()

2017-05-28 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH 12/19] blk-mq: Initialize a request before assigning a tag

2017-05-28 Thread Christoph Hellwig
On Thu, May 25, 2017 at 11:43:20AM -0700, Bart Van Assche wrote: > Initialization of blk-mq requests is a bit weird: blk_mq_rq_ctx_init() > is called after a tag has been assigned and .rq_flags is initialized > in __blk_mq_finish_request(). > > Call blk_mq_rq_ctx_init() before > modifying any

Re: [PATCH 19/19] block: Make request operation type argument declarations consistent

2017-05-28 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

[PATCH 01/22] Revert "afs: Move UUID struct to linux/uuid.h"

2017-05-28 Thread Christoph Hellwig
This reverts commit ff548773106ec7f8031bc6172e0234bd2a02c19c. The V1 uuid intrepreatation in struct form isn't really useful to the rest of the kernel, and not really compatible to it either, so move it back to AFS instead of polluting the global uuid.h. Signed-off-by: Christoph Hellwig

cleanup UUID types V5

2017-05-28 Thread Christoph Hellwig
Hi all, this series, which is a combined effort from Amir, Andy and me introduces new uuid_t and guid_t type names that are less confusing than the existing types, adds new helpers for them and starts switching the fs code over to it. Andy has additional patches on top to convert many of the

[PATCH 02/22] xfs: use uuid_copy() helper to abstract uuid_t

2017-05-28 Thread Christoph Hellwig
From: Amir Goldstein uuid_t definition is about to change. Signed-off-by: Amir Goldstein Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Andy Shevchenko

Re: [PATCH 09/10] xfs: nowait aio support

2017-05-28 Thread Christoph Hellwig
Despite my previous reviewed-by tag this will need another fix: xfs_file_iomap_begin needs to return EAGAIN if we don't have the extent list in memoery already. E.g. something like this: if ((flags & IOMAP_NOWAIT) && !(ip->i_d.if_flags & XFS_IFEXTENTS)) { error =

Re: [PATCH 08/19] block: Introduce request_queue.initialize_rq_fn()

2017-05-28 Thread h...@lst.de
On Fri, May 26, 2017 at 11:56:30PM +, Bart Van Assche wrote: > I have tried to move that call into blk_mq_alloc_request() but that > resulted in a kernel oops during boot due to scsi_add_cmd_to_list() > dereferencing scsi_cmnd.device and due to that pointer being invalid. > I think that

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

2017-05-28 Thread Christoph Hellwig
On Fri, May 26, 2017 at 04:24:42PM -0400, Martin K. Petersen wrote: > > Christoph, > > > We will only have sense data if the command exectured and got a SCSI > > result, so this is pointless. > > "executed" Thanks, fixed.

Re: [PATCH 07/13] block_dev: propagate bio_iov_iter_get_pages error in __blkdev_direct_IO

2017-05-28 Thread Christoph Hellwig
On Fri, May 26, 2017 at 11:12:31AM +0200, Johannes Thumshirn wrote: > On 05/26/2017 10:56 AM, Christoph Hellwig wrote: > > Once we move the block layer to its own status code we'll still want to > > propagate the bio_iov_iter_get_pages, so restructure __blkdev_direct_IO > > to take ret into

Re: [PATCH v2 4/8] blk-mq: fix blk_mq_quiesce_queue

2017-05-28 Thread Ming Lei
On Sat, May 27, 2017 at 09:46:45PM +, Bart Van Assche wrote: > On Sat, 2017-05-27 at 22:21 +0800, Ming Lei wrote: > > It is required that no dispatch can happen any more once > > blk_mq_quiesce_queue() returns, and we don't have such requirement > > on APIs of stopping queue. > > > > But

Re: [PATCH 0/10 v9] No wait AIO

2017-05-28 Thread Christoph Hellwig
> Changes since v8: > + Err out AIO reads with -EINVAL flagged as RWF_NOWAIT Ugg, why? Reads aren't really treated any different than writes in the direct I/O code.

[PATCH 05/22] uuid: remove uuid_be defintions from the uapi header

2017-05-28 Thread Christoph Hellwig
We don't use uuid_be and the UUID_BE constants in any uapi headers, so make them private to the kernel. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko --- include/linux/uuid.h |

[PATCH 04/22] md: namespace private helper names

2017-05-28 Thread Christoph Hellwig
From: Amir Goldstein The md private helper uuid_equal() collides with a generic helper of the same name. Rename the md private helper to md_uuid_equal() and do the same for md_sb_equal(). Signed-off-by: Amir Goldstein Signed-off-by: Christoph Hellwig

[PATCH 06/22] uuid: rename uuid types

2017-05-28 Thread Christoph Hellwig
Our "little endian" UUID really is a Wintel GUID, so rename it and its helpers such (guid_t). The big endian UUID is the only true one, so give it the name uuid_t. The uuid_le and uuid_be names are retained for now, but will hopefully go away soon. The exception to that are the _cmp helpers

[PATCH 03/22] xfs: use uuid_be to implement the uuid_t type

2017-05-28 Thread Christoph Hellwig
Use the generic Linux definition to implement our UUID type, this will allow using more generic infrastructure in the future. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Brian Foster Reviewed-by: Andy Shevchenko

[PATCH 12/22] xfs: use the common helper uuid_is_null()

2017-05-28 Thread Christoph Hellwig
From: Amir Goldstein Use the common helper uuid_is_null() and remove the xfs specific helper uuid_is_nil(). The common helper does not check for the NULL pointer value as xfs helper did, but xfs code never calls the helper with a pointer that can be NULL. Conform comments

[PATCH 10/22] S390/sysinfo: use uuid_is_null instead of opencoding it

2017-05-28 Thread Christoph Hellwig
And switch to use uuid_t instead of the old uuid_be type. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko --- arch/s390/include/asm/sysinfo.h | 4 ++-- arch/s390/kernel/sysinfo.c

[PATCH 07/22] uuid: don't export guid_index and uuid_index

2017-05-28 Thread Christoph Hellwig
These are only used in uuid.c and vsprintf.c and aren't something modules should use directly. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko --- lib/uuid.c | 2 -- 1 file changed, 2

[PATCH 09/22] uuid: hoist uuid_is_null() helper from libnvdimm

2017-05-28 Thread Christoph Hellwig
Hoist the libnvdimm helper as an inline helper to linux/uuid.h using an auxiliary const variable uuid_null in lib/uuid.c. [hch: also add the guid variant. Both do the same but I'd like to keep casts to a minimum] The common helper uses the new abstract type uuid_t * instead of u8 *.

[PATCH 08/22] uuid: hoist helpers uuid_equal() and uuid_copy() from xfs

2017-05-28 Thread Christoph Hellwig
These helper are used to compare and copy two uuid_t type objects. Signed-off-by: Amir Goldstein [hch: also provide the respective guid_ versions] Signed-off-by: Christoph Hellwig Reviewed-by: Andy Shevchenko ---

[PATCH 11/22] xfs: remove uuid_getnodeuniq and xfs_uu_t

2017-05-28 Thread Christoph Hellwig
Opencode uuid_getnodeuniq in the only caller, and directly decode the uuid_t representation instead of using a structure cast for it. Signed-off-by: Christoph Hellwig --- fs/xfs/uuid.c | 25 - fs/xfs/uuid.h | 1 - fs/xfs/xfs_mount.c | 5 - 3

Re: [PATCH v2 6/8] blk-mq: don't stop queue for quiescing

2017-05-28 Thread Ming Lei
On Sat, May 27, 2017 at 09:49:27PM +, Bart Van Assche wrote: > On Sat, 2017-05-27 at 22:21 +0800, Ming Lei wrote: > > diff --git a/block/blk-mq.c b/block/blk-mq.c > > index 032045841856..84cce67caee3 100644 > > --- a/block/blk-mq.c > > +++ b/block/blk-mq.c > > @@ -168,8 +168,6 @@ void

Re: [PATCH 05/19] cdrom: Check private request size before attaching to a queue

2017-05-28 Thread h...@lst.de
On Fri, May 26, 2017 at 03:50:42PM +, Bart Van Assche wrote: > On Fri, 2017-05-26 at 08:08 +0200, Christoph Hellwig wrote: > > On Thu, May 25, 2017 at 11:43:13AM -0700, Bart Van Assche wrote: > > > Since the cdrom driver only supports request queues for which > > > struct scsi_request is the

Re: [PATCH 10/19] blk-mq: Change blk_mq_hw_ctx.queue_rq_srcu into an array

2017-05-28 Thread Christoph Hellwig
I think starting from here thing should be in a different series.. On Thu, May 25, 2017 at 11:43:18AM -0700, Bart Van Assche wrote: > This patch does not change any functionality but makes the next > patch easier to read. I think merging the two would be better. But except for that this looks

Re: [PATCH 11/19] blk-mq: Reduce blk_mq_hw_ctx size

2017-05-28 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 0/8] blk-mq: fix & improve queue quiescing

2017-05-28 Thread Bart Van Assche
On Sun, 2017-05-28 at 19:11 +0800, Ming Lei wrote: > On Sat, May 27, 2017 at 09:32:02PM +, Bart Van Assche wrote: > > On Sat, 2017-05-27 at 22:21 +0800, Ming Lei wrote: > > > There are some issues in current blk_mq_quiesce_queue(): > > > > > > - in case of direct issue or

Re: [PATCH 12/19] blk-mq: Initialize a request before assigning a tag

2017-05-28 Thread Bart Van Assche
On Sun, 2017-05-28 at 10:42 +0200, Christoph Hellwig wrote: > On Thu, May 25, 2017 at 11:43:20AM -0700, Bart Van Assche wrote: > > Initialization of blk-mq requests is a bit weird: blk_mq_rq_ctx_init() > > is called after a tag has been assigned and .rq_flags is initialized > > in

Re: [PATCH v2 4/8] blk-mq: fix blk_mq_quiesce_queue

2017-05-28 Thread Bart Van Assche
On Sun, 2017-05-28 at 18:44 +0800, Ming Lei wrote: > On Sat, May 27, 2017 at 09:46:45PM +, Bart Van Assche wrote: > > On Sat, 2017-05-27 at 22:21 +0800, Ming Lei wrote: > > > bool blk_mq_can_queue(struct blk_mq_hw_ctx *hctx) > > > @@ -1108,13 +1119,15 @@ static void

Re: [PATCH 08/19] block: Introduce request_queue.initialize_rq_fn()

2017-05-28 Thread Bart Van Assche
On Sun, 2017-05-28 at 10:34 +0200, h...@lst.de wrote: > On Fri, May 26, 2017 at 11:56:30PM +, Bart Van Assche wrote: > > I have tried to move that call into blk_mq_alloc_request() but that > > resulted in a kernel oops during boot due to scsi_add_cmd_to_list() > > dereferencing

Re: [PATCH 09/10] xfs: nowait aio support

2017-05-28 Thread Goldwyn Rodrigues
On 05/28/2017 04:31 AM, Christoph Hellwig wrote: > Despite my previous reviewed-by tag this will need another fix: > > xfs_file_iomap_begin needs to return EAGAIN if we don't have the extent > list in memoery already. E.g. something like this: > > if ((flags & IOMAP_NOWAIT) &&

Re: [PATCH 0/10 v9] No wait AIO

2017-05-28 Thread Goldwyn Rodrigues
On 05/28/2017 04:27 AM, Christoph Hellwig wrote: >> Changes since v8: >> + Err out AIO reads with -EINVAL flagged as RWF_NOWAIT > > Ugg, why? Reads aren't really treated any different than writes in > the direct I/O code. This effort focused on writes only. >From the point of view of the