Re: [PATCH 13/25] mtd: Convert to dynamically allocated bdi infrastructure

2017-04-12 Thread Jan Kara
f the kernel are happy. > Otherwise this looks good: > > Reviewed-by: Christoph Hellwig Thanks. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 21/25] nfs: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
FS4 as well AFAICT. > Thus the patch looks fine: > > Reviewed-by: Christoph Hellwig Thanks. Honza -- Jan Kara SUSE Labs, CR

[PATCH 03/25] bdi: Export bdi_alloc_node() and bdi_put()

2017-04-12 Thread Jan Kara
MTD will want to call bdi_alloc_node() and bdi_put() directly. Export these functions. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- mm/backing-dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 164ccc93690f..3dd175986390 100644

[PATCH 02/25] block: Unregister bdi on last reference drop

2017-04-12 Thread Jan Kara
e bdi the second time if it is already unregistered. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- mm/backing-dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index e5e0972bdd6f..164ccc93690f 100644 --- a/mm/backing-dev.c +++ b/mm/ba

[PATCH 22/25] ubifs: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Signed-off-by: Jan Kara --- fs/ubifs/super.c | 25 + fs/ubifs/ubifs.h | 3 --- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index b73811bd7676..cf4cc99b75b5 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -1827,7

[PATCH 10/25] cifs: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside superblock. This unifies handling of bdi among users. CC: Steve French CC: linux-c...@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs/cifs/cifs_fs_sb.h | 1 - fs/cifs/cifsfs.c | 7

[PATCH 05/25] fs: Get proper reference for s_bdi

2017-04-12 Thread Jan Kara
device's BDI. No filesystem using mount_bdev() actually changes s_bdi so this is safe and will make bdev filesystems work the same way as filesystems needing to set up their private bdi. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs/super.c | 7 ++- 1 file changed, 2 inser

[PATCH 19/25] nilfs2: Convert to properly refcounting bdi

2017-04-12 Thread Jan Kara
: Jan Kara --- fs/nilfs2/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index e1872f36147f..feb796a38b8d 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c @@ -1068,7 +1068,8 @@ nilfs_fill_super(struct super_block *sb, void

[PATCH 01/25] bdi: Provide bdi_register_va() and bdi_alloc()

2017-04-12 Thread Jan Kara
Add function that registers bdi and takes va_list instead of variable number of arguments. Add bdi_alloc() as simple wrapper for NUMA-unaware users allocating BDI. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- include/linux/backing-dev.h | 6 ++ mm/backing-dev.c

[PATCH 08/25] btrfs: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Signed-off-by: Jan Kara --- fs/btrfs/ctree.h | 1 - fs/btrfs/disk-io.c | 36 +++- fs/btrfs/super.c | 7 +++ 3 files changed, 14 insertions(+), 30 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 29b7fc28c607..f6019ce20035 100644 --- a/fs

[PATCH 04/25] fs: Provide infrastructure for dynamic BDIs in filesystems

2017-04-12 Thread Jan Kara
: Christoph Hellwig Signed-off-by: Jan Kara --- fs/super.c | 49 include/linux/backing-dev-defs.h | 2 +- include/linux/fs.h | 6 + 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/fs/super.c b/fs

[PATCH 09/25] ceph: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside client structure. This unifies handling of bdi among users. CC: Ilya Dryomov CC: "Yan, Zheng" CC: Sage Weil CC: ceph-de...@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs/c

[PATCH 12/25] afs: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: David Howells CC: linux-...@lists.infradead.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs/afs/internal.h | 1 - fs/afs/super.c| 5

[PATCH 0/25 v3] fs: Convert all embedded bdis into separate ones

2017-04-12 Thread Jan Kara
Hello, this is the third revision of the patch series which converts all embedded occurences of struct backing_dev_info to use standalone dynamically allocated structures. This makes bdi handling unified across all bdi users and generally removes some boilerplate code from filesystems setting up t

[PATCH 21/25] nfs: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Trond Myklebust CC: Anna Schumaker CC: linux-...@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs/nfs/client.c | 10

[PATCH 13/25] mtd: Convert to dynamically allocated bdi infrastructure

2017-04-12 Thread Jan Kara
to make mtd hold and drop bdi reference as needed which seems pointless for passing one global pointer... CC: David Woodhouse CC: Brian Norris CC: linux-...@lists.infradead.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- drivers/mtd/mtdcore.c | 23 --- dri

[PATCH 18/25] gfs2: Convert to properly refcounting bdi

2017-04-12 Thread Jan Kara
Signed-off-by: Jan Kara --- fs/gfs2/ops_fstype.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index b108e7ba81af..e6b6f97d0fc1 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -23,6 +23,7 @@ #include

[PATCH 17/25] fuse: Get rid of bdi_initialized

2017-04-12 Thread Jan Kara
It is not needed anymore since bdi is initialized whenever superblock exists. CC: Miklos Szeredi CC: linux-fsde...@vger.kernel.org Suggested-by: Miklos Szeredi Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs/fuse/dev.c| 5 ++--- fs/fuse/fuse_i.h | 3 --- fs/fuse/inode.c

[PATCH 11/25] ecryptfs: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Tyler Hicks CC: ecryp...@vger.kernel.org Acked-by: Tyler Hicks Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs/ecryptfs/ecryptfs_kernel.h | 1

[PATCH 15/25] exofs: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Boaz Harrosh CC: Benny Halevy Acked-by: Boaz Harrosh Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs/exofs/exofs.h | 1 - fs/exofs/super.c

[PATCH 14/25] coda: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Jan Harkes CC: c...@cs.cmu.edu CC: codal...@coda.cs.cmu.edu Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs/coda/inode.c| 11

[PATCH 07/25] 9p: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside session. This unifies handling of bdi among users. CC: Eric Van Hensbergen CC: Ron Minnich CC: Latchesar Ionkov CC: v9fs-develo...@lists.sourceforge.net Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs

[PATCH 20/25] ncpfs: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Petr Vandrovec Acked-by: Petr Vandrovec Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs/ncpfs/inode.c | 8 ++-- fs/ncpfs/ncp_fs_sb.h

[PATCH 25/25] bdi: Drop 'parent' argument from bdi_register[_va]()

2017-04-12 Thread Jan Kara
Drop 'parent' argument of bdi_register() and bdi_register_va(). It is always NULL. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- drivers/mtd/mtdcore.c | 2 +- fs/super.c | 2 +- include/linux/backing-dev.h | 9 - mm/backing-dev.c

[PATCH 06/25] lustre: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
: Jan Kara --- .../staging/lustre/lustre/include/lustre_disk.h| 4 drivers/staging/lustre/lustre/llite/llite_lib.c| 24 +++--- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_disk.h b/drivers/staging/lustre

[PATCH 24/25] block: Remove unused functions

2017-04-12 Thread Jan Kara
Now that all backing_dev_info structure are allocated separately, we can drop some unused functions. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- include/linux/backing-dev.h | 5 mm/backing-dev.c| 56 + 2 files changed

[PATCH 16/25] fuse: Convert to separately allocated bdi

2017-04-12 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Miklos Szeredi CC: linux-fsde...@vger.kernel.org Acked-by: Miklos Szeredi Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- fs/fuse/dev.c| 8

[PATCH 23/25] fs: Remove SB_I_DYNBDI flag

2017-04-12 Thread Jan Kara
Now that all bdi structures filesystems use are properly refcounted, we can remove the SB_I_DYNBDI flag. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- drivers/mtd/mtdsuper.c | 1 - fs/gfs2/ops_fstype.c | 1 - fs/nfs/super.c | 1 - fs/nilfs2/super.c | 1 - fs/super.c

Re: [PATCH] block: Make writeback throttling defaults consistent for SQ devices

2017-04-18 Thread Jan Kara
Hello Bart, On Fri 14-04-17 15:42:53, Bart Van Assche wrote: > On Wed, 2017-04-12 at 10:23 +0200, Jan Kara wrote: > > +#ifndef CONFIG_BLK_WBT_MQ > > + if (q->mq_ops) > > + return; > > +#endif > > +#ifndef CONFIG_BLK_WBT_SQ > > + if (q->re

Re: [PATCH 4/8] nowait-aio: Introduce IOMAP_NOWAIT

2017-04-19 Thread Jan Kara
report extent status, e.g. FIEMAP */ > #define IOMAP_FAULT (1 << 3) /* mapping for page fault */ > #define IOMAP_DIRECT (1 << 4) /* direct I/O */ > +#define IOMAP_NOWAIT (1 << 5) /* Don't wait for writeback */ > > struct iomap_ops { > /* > -- > 2.12.0 > -- Jan Kara SUSE Labs, CR

[PATCH] block: Make writeback throttling defaults consistent for SQ devices

2017-04-19 Thread Jan Kara
enabled by default) when we switch from it to another IO scheduler. Signed-off-by: Jan Kara --- block/blk-sysfs.c | 19 +-- block/blk-wbt.c | 19 +++ block/blk-wbt.h | 4 block/elevator.c | 3 +++ 4 files changed, 27 insertions(+), 18 deletions(-) diff --g

Re: [PATCH] block: Make writeback throttling defaults consistent for SQ devices

2017-04-19 Thread Jan Kara
On Wed 19-04-17 11:33:27, Jan Kara wrote: > When CFQ is used as an elevator, it disables writeback throttling > because they don't play well together. Later when a different elevator > is chosen for the device, writeback throttling doesn't get enabled > again as it should.

Re: [PATCH 2/8] nowait aio: Introduce RWF_NOWAIT

2017-04-19 Thread Jan Kara
ay be complicated in the current implementation but IMO it makes sense to ask for such functionality (see e.g. patches for non-blocking buffered reads that were flying around year or two ago). So I agree with Christoph that EOPNOTSUPP is more logical. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-04-20 Thread Jan Kara
dvisory REQ_SYNC or REQ_IDLE flags have nothing to do with the ability of the block layer to submit the bio without blocking... Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v3 04/20] fs: check for writeback errors after syncing out buffers in generic_file_fsync

2017-04-24 Thread Jan Kara
That > will be sufficient for this case, and help other callers detect > these errors properly as well. > > With that, we don't need to twiddle it in ext2. > > Suggested-by: Jan Kara > Signed-off-by: Jeff Layton Looks good t

Re: [PATCH v3 06/20] dax: set errors in mapping when writeback fails

2017-04-24 Thread Jan Kara
gh the mapping. After improving the changelog you can add: Reviewed-by: Jan Kara Honza > --- > fs/dax.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/dax.c b/fs/dax.c > index 85ab

Re: [PATCH v3 08/20] mm: ensure that we set mapping error if writeout() fails

2017-04-24 Thread Jan Kara
On Mon 24-04-17 09:22:47, Jeff Layton wrote: > If writepage fails during a page migration, then we need to ensure that > fsync will see it by flagging the mapping. > > Signed-off-by: Jeff Layton Looks good to me. You can add: Reviewed-

Re: [PATCH v3 09/20] 9p: set mapping error when writeback fails in launder_page

2017-04-24 Thread Jan Kara
On Mon 24-04-17 09:22:48, Jeff Layton wrote: > launder_page is just writeback under the page lock. We still need to > mark the mapping for errors there when they occur. > > Signed-off-by: Jeff Layton Looks good. You can add: Reviewed-

Re: [PATCH v3 10/20] fuse: set mapping error in writepage_locked when it fails

2017-04-24 Thread Jan Kara
gt; @@ -1669,6 +1669,7 @@ static int fuse_writepage_locked(struct page *page) > err_free: > fuse_request_free(req); > err: > + mapping_set_error(page->mapping, error); > end_page_writeback(page); > return error; > } > -- > 2.9.3 > > -- Jan Kara SUSE Labs, CR

Re: [PATCH v3 10/20] fuse: set mapping error in writepage_locked when it fails

2017-04-25 Thread Jan Kara
On Mon 24-04-17 13:14:36, Jeff Layton wrote: > On Mon, 2017-04-24 at 18:04 +0200, Jan Kara wrote: > > On Mon 24-04-17 09:22:49, Jeff Layton wrote: > > > This ensures that we see errors on fsync when writeback fails. > > > > > > Signed-off-by: Jeff Layton &g

Re: [PATCH v3 10/20] fuse: set mapping error in writepage_locked when it fails

2017-04-25 Thread Jan Kara
On Tue 25-04-17 06:35:13, Jeff Layton wrote: > On Tue, 2017-04-25 at 10:17 +0200, Jan Kara wrote: > > On Mon 24-04-17 13:14:36, Jeff Layton wrote: > > > On Mon, 2017-04-24 at 18:04 +0200, Jan Kara wrote: > > > > On Mon 24-04-17 09:22:49, Jeff Layton wrote: > > &

Treat REQ_FUA and REQ_PREFLUSH as synchronous

2017-05-02 Thread Jan Kara
nc() since callers cannot rely on this anyway... Thoughts? Honza -- Jan Kara SUSE Labs, CR

Re: BUG: KASAN: use-after-free in scsi_exit_rq

2017-05-02 Thread Jan Kara
I'm also not aware of any particular breakage this would cause. However logically the freeing of request mempools really belongs to blk_release_queue() so it seems a bit dumb to move blk_exit_rl() just because SCSI stores the fact from which slab cache it has allocated the sense buffer in a structure (shost) that it frees under its hands by the time blk_release_queue() is called. :-| Honza -- Jan Kara SUSE Labs, CR

Re: Treat REQ_FUA and REQ_PREFLUSH as synchronous

2017-05-02 Thread Jan Kara
On Tue 02-05-17 08:49:14, Jens Axboe wrote: > On 05/02/2017 08:45 AM, Christoph Hellwig wrote: > > On Tue, May 02, 2017 at 12:21:23PM +0200, Jan Kara wrote: > >> it makes sense to treat REQ_FUA and REQ_PREFLUSH ops as synchronous in > >> op_is_sync() since callers

Re: Treat REQ_FUA and REQ_PREFLUSH as synchronous

2017-05-02 Thread Jan Kara
On Tue 02-05-17 08:18:15, Christoph Hellwig wrote: > On Tue, May 02, 2017 at 05:15:58PM +0200, Jan Kara wrote: > > in generic_make_request_checks()? Or just set it unconditionally in that > > function if we see REQ_FUA | REQ_PREFLUSH set? > > Just add REQ_FUA and REQ_PR

[PATCH] nfs: Fix bdi handling for cloned superblocks

2017-05-04 Thread Jan Kara
m [] (do_mount+0x158/0xc7c) [] (do_mount) from [] (SyS_mount+0x8c/0xb4) [] (SyS_mount) from [] (ret_fast_syscall+0x0/0x3c) Fix the problem by always creating new bdi for a superblock as we used to do. Reported-and-tested-by: Corentin Labbe Fixes: 0d3b12584972ce5781179ad3f15cca3cdb5cae05 Signed-off-by: Jan Ka

Re: [PATCH 6/8] nowait aio: ext4

2017-05-09 Thread Jan Kara
cation > > Signed-off-by: Goldwyn Rodrigues The patch looks good. You can add: Reviewed-by: Jan Kara Honza > --- > fs/ext4/file.c | 20 > 1 file changed, 16 insertions(+), 4 deletions(-) >

Re: [PATCH v4 01/27] fs: remove unneeded forward definition of mm_struct from fs.h

2017-05-10 Thread Jan Kara
On Tue 09-05-17 11:49:04, Jeff Layton wrote: > Signed-off-by: Jeff Layton Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > include/linux/fs.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --g

Re: [PATCH v4 05/27] btrfs: btrfs_wait_tree_block_writeback can be void return

2017-05-10 Thread Jan Kara
On Tue 09-05-17 11:49:08, Jeff Layton wrote: > Nothing checks its return value. > > Signed-off-by: Jeff Layton Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/btrfs/disk-io.c | 6 +++--- &

Re: [PATCH v4 11/27] fuse: set mapping error in writepage_locked when it fails

2017-05-10 Thread Jan Kara
On Tue 09-05-17 11:49:14, Jeff Layton wrote: > This ensures that we see errors on fsync when writeback fails. > > Signed-off-by: Jeff Layton > Reviewed-by: Christoph Hellwig Looks good to me. You can add: Reviewed-

Re: [PATCH v4 12/27] cifs: set mapping error when page writeback fails in writepage or launder_pages

2017-05-10 Thread Jan Kara
On Tue 09-05-17 11:49:15, Jeff Layton wrote: > Signed-off-by: Jeff Layton > Reviewed-by: Christoph Hellwig Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/cifs/file.c | 12 +++- >

Re: [PATCH v4 13/27] lib: add errseq_t type and infrastructure for handling it

2017-05-10 Thread Jan Kara
*/ > + new = old | ERRSEQ_SEEN; > + if (new != old) > + cmpxchg(eseq, old, new); > + *since = new; > + err = -(new & MAX_ERRNO); > + } > + return err; > +} > +EXPORT_SYMBOL(errseq_check_and_advance); Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v4 14/27] fs: new infrastructure for writeback error handling and reporting

2017-05-10 Thread Jan Kara
false report of success. > > The new behavior is still consistent with the POSIX spec, and is more > reliable for application developers. This patch just adds some basic > infrastructure for doing this. Later patches will change the existing > code to use this new infrastructu

Re: [PATCH v4 14/27] fs: new infrastructure for writeback error handling and reporting

2017-05-10 Thread Jan Kara
On Wed 10-05-17 08:19:50, Jeff Layton wrote: > On Wed, 2017-05-10 at 13:48 +0200, Jan Kara wrote: > > On Tue 09-05-17 11:49:17, Jeff Layton wrote: > > > diff --git a/fs/file_table.c b/fs/file_table.c > > > index 954d510b765a..d6138b6411ff 100644 > > >

Re: [PATCH v4 15/27] fs: retrofit old error reporting API onto new infrastructure

2017-05-15 Thread Jan Kara
etadata mapping (and this is not a problem specific to f2fs. For example ext2 also uses this scheme where block devices' mapping is the metadata mapping). And we need to merge error information from these two mappings so for the stamping scheme to work, we'd need two stamps stored in struct file. One for data mapping and one for metadata mapping. Or maybe there's some more clever scheme but for now I don't see one... Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v4 19/27] buffer: set errors in mapping at the time that the error occurs

2017-05-15 Thread Jan Kara
heck this flag in order to set the error in the > mapping. > > This sets the error in the mapping earlier, at the time that it's first > detected. > > Signed-off-by: Jeff Layton Looks good to me. You can add: Reviewed-by: Jan Kara Small nits below. > @@ -354,7 +354

Re: [PATCH v4 22/27] jbd2: don't reset error in journal_finish_inode_data_buffers

2017-05-15 Thread Jan Kara
On Tue 09-05-17 11:49:25, Jeff Layton wrote: > Now that we don't clear writeback errors after fetching them, there is > no need to reset them. This is also potentially racy. > > Signed-off-by: Jeff Layton Looks good. You can add: Revi

Re: [PATCH v4 21/27] mm: clean up error handling in write_one_page

2017-05-15 Thread Jan Kara
riteback error since then. > > Signed-off-by: Jeff Layton Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > mm/page-writeback.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) &g

Re: [PATCH 04/10] fs: Introduce RWF_NOWAIT

2017-05-15 Thread Jan Kara
pr_debug("EFAULT: aio_key\n"); I think you need to also check here that the IO is write. So that NOWAIT reads don't silently pass. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 16/25] fuse: Convert to separately allocated bdi

2017-05-16 Thread Jan Kara
On Mon 15-05-17 23:34:00, Rakesh Pandit wrote: > Hi Jan, Miklos, > > On Wed, Apr 12, 2017 at 12:24:40PM +0200, Jan Kara wrote: > > Allocate struct backing_dev_info separately instead of embedding it > > inside the superblock. This unifies handling of bdi among users. >

Re: [PATCH 16/25] fuse: Convert to separately allocated bdi

2017-05-17 Thread Jan Kara
On Tue 16-05-17 17:24:21, Jens Axboe wrote: > On May 16, 2017, at 12:37 PM, Rakesh Pandit wrote: > > > >> On Tue, May 16, 2017 at 12:48:31PM +0200, Jan Kara wrote: > >>> On Mon 15-05-17 23:34:00, Rakesh Pandit wrote: > >>> Hi Jan, Miklos, > >>

Re: [PATCH 01/10] fs: Separate out kiocb flags setup based on RWF_* flags

2017-05-25 Thread Jan Kara
On Wed 24-05-17 11:41:41, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > Signed-off-by: Goldwyn Rodrigues > Reviewed-by: Christoph Hellwig Looks good. You can add: Reviewed-by: Jan Kara Honza > --- >

Re: [PATCH 02/10] fs: Introduce filemap_range_has_page()

2017-05-25 Thread Jan Kara
gt; writes. > > Signed-off-by: Goldwyn Rodrigues > Reviewed-by: Christoph Hellwig Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > include/linux/fs.h | 2 ++ > mm/filemap.c | 33 +++

Re: [PATCH 03/10] fs: Use RWF_* flags for AIO operations

2017-05-25 Thread Jan Kara
ng applications. > > Note, the only place RWF_HIPRI comes in effect is dio_await_one(). > All the rest of the locations, aio code return -EIOCBQUEUED before the > checks for RWF_HIPRI. > > Signed-off-by: Goldwyn Rodrigues > Reviewed-by: Christoph Hellwig Looks good.

Re: [PATCH 04/10] fs: Introduce RWF_NOWAIT

2017-05-25 Thread Jan Kara
not, we perform the check defined > by .write_iter() which is called for direct IO specifically. > > Filesystems xfs, btrfs and ext4 would be supported in the following patches. > > Signed-off-by: Goldwyn Rodrigues > Reviewed-by: Christoph Hell

Re: [PATCH 05/10] fs: return if direct write will trigger writeback

2017-05-25 Thread Jan Kara
hrottling logic, page loading > from disk etc. which cannot be taken care of. > > Signed-off-by: Goldwyn Rodrigues > Reviewed-by: Christoph Hellwig Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > mm/fil

Re: [PATCH 06/10] fs: Introduce IOMAP_NOWAIT

2017-05-25 Thread Jan Kara
On Wed 24-05-17 11:41:46, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > IOCB_NOWAIT translates to IOMAP_NOWAIT for iomaps. > This is used by XFS in the XFS patch. > > Signed-off-by: Goldwyn Rodrigues > Reviewed-by: Christoph Hellwig Looks good. You can add:

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

2017-05-29 Thread Jan Kara
ly user? I > understand the block layer can block if it has too many requests though. Well, submitting such write will have to wait for read of metadata from disk. That is certainly considered blocking so Christoph is right that we must return EAGAIN in such case. Honza -- Jan Kara SUSE Labs, CR

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

2017-05-31 Thread Jan Kara
EAGAIN can be returned if io submission would block. Honza -- Jan Kara SUSE Labs, CR

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

2017-06-16 Thread Jan Kara
omer that is working on testing the series with their workload however that will take some time given it requires updating their software stack. If you are looking for some synthetic benchmark results, I suppose we can put something together however it's going to be just a synthetic benchmark and as such the relevance is limited. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v7 05/22] jbd2: don't clear and reset errors after waiting on writeback

2017-06-20 Thread Jan Kara
27;t attempt to > re-set the error flag if it fails. > > Signed-off-by: Jeff Layton Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/jbd2/commit.c | 15 +++ > include/linux/f

Re: [PATCH v7 01/22] fs: remove call_fsync helper function

2017-06-20 Thread Jan Kara
On Fri 16-06-17 15:34:06, Jeff Layton wrote: > Requested-by: Christoph Hellwig > Signed-off-by: Jeff Layton Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > fs/sync.c | 2 +- > inc

[PATCH 01/19] bcache: Fix leak of bdev reference

2017-06-30 Thread Jan Kara
If blkdev_get_by_path() in register_bcache() fails, we try to lookup the block device using lookup_bdev() to detect which situation we are in to properly report error. However we never drop the reference returned to us from lookup_bdev(). Fix that. Signed-off-by: Jan Kara Cc: sta

[PATCH 01/19] bcache: Fix leak of bdev reference

2017-06-30 Thread Jan Kara
If blkdev_get_by_path() in register_bcache() fails, we try to lookup the block device using lookup_bdev() to detect which situation we are in to properly report error. However we never drop the reference returned to us from lookup_bdev(). Fix that. Signed-off-by: Jan Kara Cc: sta

Re: [PATCH 10/17] block/cfq: replace cfq_rb_root leftmost caching

2017-07-19 Thread Jan Kara
od to me. You can add: Reviewed-by: Jan Kara Honza > --- > block/cfq-iosched.c | 70 > +++-- > 1 file changed, 20 insertions(+), 50 deletions(-) > > diff --git a/block/cfq-

Re: [PATCH 17/17] block/cfq: cache rightmost rb_node

2017-07-19 Thread Jan Kara
cfq_data *cfqd, > struct cfq_queue *cfqq, > st = st_for(cfqq->cfqg, cfqq_class(cfqq), cfqq_type(cfqq)); > if (cfq_class_idle(cfqq)) { > rb_key = CFQ_IDLE_DELAY; > - parent = rb_last(&st->rb.rb_root); > + parent = st->rb_rightmost; > if (parent && parent != &cfqq->rb_node) { > __cfqq = rb_entry(parent, struct cfq_queue, rb_node); > rb_key += __cfqq->rb_key; > -- > 2.12.0 > -- Jan Kara SUSE Labs, CR

Re: bfq/ext4 disk IO hangs forever on resume

2017-07-25 Thread Jan Kara
_wait+0x50/0x50 > out_of_line_wait_on_bit+0x6e/0x80 > ? autoremove_wake_function+0x30/0x30 > __wait_on_buffer+0x2d/0x30 > jbd2_journal_commit_transaction+0xe6a/0x1700 > kjournald2+0xc8/0x270 > ? kjournald2+0xc8/0x270 > ? wake_atomic_t_function+0x50/0x50 > kthread+0xfe/0x130 > ? commit_timeout+0x10/0x10 > ? kthread_create_on_node+0x40/0x40 > ret_from_fork+0x27/0x40 > [ more processes follow, some different tracebacks ] -- Jan Kara SUSE Labs, CR

[PATCH] block: Add comment to submit_bio_wait()

2017-08-02 Thread Jan Kara
submit_bio_wait() does not consume bio reference. Add comment about that. Signed-off-by: Jan Kara --- block/bio.c | 4 1 file changed, 4 insertions(+) diff --git a/block/bio.c b/block/bio.c index 9a63597aaacc..e241bbc49f14 100644 --- a/block/bio.c +++ b/block/bio.c @@ -936,6 +936,10

Re: [PATCH 1/9] QUEUE_FLAG_NOWAIT to indicate device supports nowait

2017-08-10 Thread Jan Kara
system calls in case of error? > > For aio, there are two result fields in io_event out of which one could > be used for error while the other be used for amount of writes/reads > performed. However, only one is used. This will not work with > pread()/pwrite() calls though because of the limitation of return values. > > Finally, what if the EWOULDBLOCK is returned for an earlier bio (say > offset 128k) for a 1MB pwrite(), while the rest of the 7 128K are > successful. What short return value should the system call return? This is indeed tricky. If an application submits 1MB write, I don't think we can afford to just write arbitrary subset of it. That just IMHO too much violates how writes traditionally behaved. Even short writes trigger bugs in various applications but I'm willing to require that applications using NOWAIT IO can handle these. However writing arbitrary subset looks like a nasty catch. IMHO we should not submit further bios until we are sure current one does not return EWOULDBLOCK when splitting a larger one... Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 1/4] fs: pass iocb to do_generic_file_read

2017-08-24 Thread Jan Kara
On Tue 22-08-17 18:17:09, Christoph Hellwig wrote: > And rename it to the more descriptive generic_file_buffered_read while > at it. > > Signed-off-by: Christoph Hellwig Looks good. You can add: Reviewed-by: Jan Kara

Re: [PATCH 2/4] fs: support IOCB_NOWAIT in generic_file_buffered_read

2017-08-24 Thread Jan Kara
just check IOCB_NOWAIT in !PageUptodate(page) branch above and bail - which also removes the need for the two checks below... Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 3/4] fs: support RWF_NOWAIT for buffered reads

2017-08-24 Thread Jan Kara
ig Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > fs/aio.c | 6 -- > fs/btrfs/file.c| 6 +- > fs/ext4/file.c | 6 +++--- > fs/xfs/xfs_file.c | 11 +-- > include/

Re: [PATCH 4/4] block_dev: support RFW_NOWAIT on block device nodes

2017-08-24 Thread Jan Kara
On Tue 22-08-17 18:17:12, Christoph Hellwig wrote: > All support is already there in the generic code, we just need to wire > it up. > > Signed-off-by: Christoph Hellwig Looks good. You can add: Reviewed-by: Jan Kara

[PATCH 0/2] blkdev: Fix livelock when loop device updates capacity

2019-01-14 Thread Jan Kara
Hello, this series fixes a long standing issue with loop device which can change block device size under a mounted filesystem which causes infinite loop inside buffer head code. See patch 2/2 for details about the problem. Note that generally it is dangerous to resize the loop device when filesys

[PATCH 2/2] blockdev: Fix livelocks on loop device

2019-01-14 Thread Jan Kara
for help with debugging the problem. Reported-by: syzbot+9933e4476f365f5d5...@syzkaller.appspotmail.com Signed-off-by: Jan Kara --- fs/block_dev.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index c546cdc

[PATCH 1/2] nbd: Use set_blocksize() to set device blocksize

2019-01-14 Thread Jan Kara
NBD can update block device block size implicitely through bd_set_size(). Make it explicitely set blocksize with set_blocksize() as this behavior of bd_set_size() is going away. CC: Josef Bacik Signed-off-by: Jan Kara --- drivers/block/nbd.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[PATCH] loop: Add test for changing capacity when filesystem is mounted

2019-01-14 Thread Jan Kara
Add test for changing capacity of a loop device when a filesystem with non-default block size is mounted on it. This is a regression test for "blockdev: Fix livelocks on loop device". Signed-off-by: Jan Kara --- tests/loop/007 | 38 ++ tests/lo

Re: [PATCH] loop: Add test for changing capacity when filesystem is mounted

2019-01-14 Thread Jan Kara
On Mon 14-01-19 11:41:19, Jan Kara wrote: > On Mon 14-01-19 18:44:22, Tetsuo Handa wrote: > > Thank you for the patch. > > > > On 2019/01/14 17:48, Jan Kara wrote: > > > + # This hangs if rereading capacity changed block size > > > + l /mnt > > >

Re: [PATCH] loop: Add test for changing capacity when filesystem is mounted

2019-01-14 Thread Jan Kara
On Mon 14-01-19 19:10:17, Chaitanya Kulkarni wrote: > Hi Jan, > > Thanks for the test. > >      1From 45a003672775cb6dcebc99d7ddfe19a1c9507ac3 Mon Sep 17 > 00:00:00 2001 >      2 From: Jan Kara >      3Date: Mon, 14 Jan 2019 09:23:42 +0100 >  

[PATCH v2] loop: Add test for changing capacity when filesystem is mounted

2019-01-21 Thread Jan Kara
Add test for changing capacity of a loop device when a filesystem with non-default block size is mounted on it. This is a regression test for "blockdev: Fix livelocks on loop device". Signed-off-by: Jan Kara --- tests/loop/007 | 39 +++ tests/lo

Re: [PATCH v2 0/4] Write-hint for FS journal

2019-01-24 Thread Jan Kara
> > - introduce four more hints for in-kernel use, as recommended by Dave chinner > > & Jens axboe. This isolates kernel-mode hints from user-mode ones. > > - remove mount-option to specify write-hint, as recommended by Jan kara & >

Re: [PATCH 2/4] introduce four macros for in-kernel hints

2019-01-24 Thread Jan Kara
? If that's the case, it doesn't really matter which numbers we pick. One thing I don't quite like is the naming of KERN_WRITE_LIFE_SHORT etc.. It is upto filesystem to assign meanings to the write hints. So I think it is enough to provide something like KERN_WRITE_HINT_MIN which is the first hint available to the kernel and then the number of hints available to the kernel. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 4/4] fs/ext4,jbd2: add support for passing write-hint with journal.

2019-01-24 Thread Jan Kara
ext4_journal_commit_callback; So I'd rather have defines like: #define EXT4_WRITE_HINT_JOURNAL KERN_WRITE_HINT_MIN like I suggested in another email and then later we could add stuff like #define EXT4_WRITE_HINT_BITMAP (KERN_WRITE_HINT_MIN + 1) etc. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v2 0/4] Write-hint for FS journal

2019-01-28 Thread Jan Kara
lers? Or are you just afraid that there could be? Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v2 0/4] Write-hint for FS journal

2019-01-29 Thread Jan Kara
On Mon 28-01-19 16:24:24, Keith Busch wrote: > On Mon, Jan 28, 2019 at 04:47:09AM -0800, Jan Kara wrote: > > On Fri 25-01-19 09:23:53, Keith Busch wrote: > > > On Wed, Jan 09, 2019 at 09:00:57PM +0530, Kanchan Joshi wrote: > > > > Towards supporing write-hints/

Re: [PATCH] blk-throttle: limit bios to fix amount of pages entering writeback prematurely

2019-01-31 Thread Jan Kara
q, > > @@ -733,6 +736,7 @@ static inline bool blkcg_bio_issue_check(struct > > request_queue *q, > > struct blkcg *blkcg; > > struct blkcg_gq *blkg; > > bool throtl = false; > > + unsigned long wait = 0; > > rcu_read_lock(); > > blkcg = bio_blkcg(bio); > > @@ -742,7 +746,7 @@ static inline bool blkcg_bio_issue_check(struct > > request_queue *q, > > if (unlikely(IS_ERR(blkg))) > > blkg = NULL; > > - throtl = blk_throtl_bio(q, blkg, bio); > > + throtl = blk_throtl_bio(q, blkg, bio, &wait); > > spin_unlock_irq(q->queue_lock); > > if (!throtl && !bio_flagged(bio, BIO_THROTL_COUNTED)) { > > @@ -754,6 +758,11 @@ static inline bool blkcg_bio_issue_check(struct > > request_queue *q, > > } > > rcu_read_unlock(); > > + if (wait > 0) { > > + __set_current_state(TASK_KILLABLE); > > + io_schedule_timeout(wait); > > + } > > + > > return !throtl; > > } > > -- Jan Kara SUSE Labs, CR

Re: [PATCH v2 0/4] Write-hint for FS journal

2019-02-05 Thread Jan Kara
On Wed 30-01-19 19:24:39, Kanchan Joshi wrote: > > On Wednesday 30 January 2019 05:43 AM, Dave Chinner wrote: > > On Tue, Jan 29, 2019 at 11:07:02AM +0100, Jan Kara wrote: > > > On Mon 28-01-19 16:24:24, Keith Busch wrote: > > > > On Mon, Jan 28, 2019 at

[PATCH] blktrace: Show requests without sector

2019-02-06 Thread Jan Kara
e_sector() return 0 for requests without initialized sector. Signed-off-by: Jan Kara --- include/linux/blktrace_api.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 8804753805ac..353fd8c70760 100644 --- a/inclu

Re: [PATCH] blktrace: Show requests without sector

2019-02-07 Thread Jan Kara
On Wed 06-02-19 12:49:46, Jens Axboe wrote: > On 2/6/19 5:04 AM, Jan Kara wrote: > > Currently, blktrace will not show requests that don't have any data as > > rq->__sector is initialized to -1 which is out of device range and thus > > discarded by act_log_check().

[PATCH v2] blktrace: Show requests without sector

2019-02-07 Thread Jan Kara
e_sector() return 0 for requests without initialized sector. Reviewed-by: Johannes Thumshirn Signed-off-by: Jan Kara --- include/linux/blktrace_api.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 8804

<    1   2   3   4   5   6   >