f the
kernel are happy.
> Otherwise this looks good:
>
> Reviewed-by: Christoph Hellwig
Thanks.
Honza
--
Jan Kara
SUSE Labs, CR
FS4 as well AFAICT.
> Thus the patch looks fine:
>
> Reviewed-by: Christoph Hellwig
Thanks.
Honza
--
Jan Kara
SUSE Labs, CR
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
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
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
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
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
: 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
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
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
: 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
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
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
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
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
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
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
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
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
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
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
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
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
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
: 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
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
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
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
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
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
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
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.
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
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
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
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
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-
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-
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
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
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:
> > &
nc() since callers cannot rely on this anyway... Thoughts?
Honza
--
Jan Kara
SUSE Labs, CR
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
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
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
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
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(-)
>
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
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 +++---
&
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-
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 +++-
>
*/
> + 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
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
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
> > >
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
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
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
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
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
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.
>
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,
> >>
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
> ---
>
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 +++
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.
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
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
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:
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
EAGAIN can be returned if io submission would block.
Honza
--
Jan Kara
SUSE Labs, CR
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
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
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
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
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
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-
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
_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
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
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
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
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
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/
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
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
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
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
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
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
> >
>
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
>
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
>
> - 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 &
>
? 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
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
lers? Or are you just afraid
that there could be?
Honza
--
Jan Kara
SUSE Labs, CR
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/
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
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
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
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().
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
301 - 400 of 585 matches
Mail list logo