Re: [PATCH 07/10] dax: export functions for use with btrfs

2018-12-05 Thread Christoph Hellwig
If you want to export these at all they have to be EXPORT_SYMBOL_GPL. But I'd really like to avoid seeing another duplicate DAX I/O path. Please try to adopt the existing iomap-based infrastructure for your needs first.

Re: [RFC PATCH] btrfs: drop file privileges in btrfs_clone_files

2018-11-27 Thread Christoph Hellwig
On Wed, Nov 28, 2018 at 09:44:59AM +0200, Nikolay Borisov wrote: > > > On 28.11.18 г. 5:07 ч., Lu Fengqi wrote: > > The generic/513 tell that cloning into a file did not strip security > > privileges (suid, capabilities) like a regular write would. > > > > Signed-off-by: Lu Fengqi > > --- > >

Re: [PATCH V10 08/19] btrfs: move bio_pages_all() to btrfs

2018-11-19 Thread Christoph Hellwig
On Mon, Nov 19, 2018 at 04:19:24PM +0800, Ming Lei wrote: > On Fri, Nov 16, 2018 at 02:38:45PM +0100, Christoph Hellwig wrote: > > On Thu, Nov 15, 2018 at 04:52:55PM +0800, Ming Lei wrote: > > > BTRFS is the only user of this helper, so move this helper into > > >

Re: [PATCH 04/25] vfs: strengthen checking of file range inputs to generic_remap_checks

2018-10-11 Thread Christoph Hellwig
and we must obey resource limits (RLIMIT_FSIZE). > > Therefore, add these checks to the new generic_remap_checks function so > that we curtail unexpected behavior. > > Signed-off-by: Darrick J. Wong > Reviewed-by: Amir Goldstein Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 03/25] vfs: check file ranges before cloning files

2018-10-11 Thread Christoph Hellwig
> -EXPORT_SYMBOL(vfs_clone_file_prep_inodes); > +EXPORT_SYMBOL(vfs_clone_file_prep); Btw, why isn't this EXPORT_SYMBOL_GPL? It is rather Linux internal code, including some that I wrote which you lifted into the core in "vfs: refactor clone/dedupe_file_range common functions".

Re: [PATCH 02/25] vfs: vfs_clone_file_prep_inodes should return EINVAL for a clone from beyond EOF

2018-10-11 Thread Christoph Hellwig
would be a good time to switch btrfs to use vfs_clone_file_prep_inodes so that we don't have any discrepancies? Otherwise looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH 01/25] xfs: add a per-xfs trace_printk macro

2018-10-11 Thread Christoph Hellwig
On Wed, Oct 10, 2018 at 09:12:23PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong > > Add a "xfs_tprintk" macro so that developers can use trace_printk to > print out arbitrary debugging information with the XFS device name > attached to the trace output. I can't say I'm a fan of this.

Re: exporting uuid_t from uapi/linux/uuid.h

2018-08-22 Thread Christoph Hellwig
On Tue, Aug 21, 2018 at 10:25:50PM +0300, Nikolay Borisov wrote: > Hello, > > I'm doing some refactoring on btrfs and would like to convert some of > the "naked" definition of UUID in on-disk object to uuid_t. Since those > structs are defined in include/uapi/linux/btrfs_tree.h I naturally would

Re: [PATCH 01/10] mm: pagecache add lock

2018-05-23 Thread Christoph Hellwig
On Sun, May 20, 2018 at 06:45:24PM -0400, Kent Overstreet wrote: > > > > Honestly I think this probably should be in the core. But IFF we move > > it to the core the existing users of per-fs locks need to be moved > > over first. E.g. XFS as the very first one, and at least ext4 and f2fs > >

Re: [PATCH] Btrfs: implement unlocked buffered write

2018-05-23 Thread Christoph Hellwig
On Tue, May 22, 2018 at 02:31:36PM -0400, Chris Mason wrote: > > And what protects two writes from interleaving their results now? > > page locks...ish, we at least won't have results interleaved in a single > page. For btrfs it'll actually be multiple pages since we try to do more > than one at

Re: [PATCH] Btrfs: implement unlocked buffered write

2018-05-22 Thread Christoph Hellwig
On Wed, May 16, 2018 at 11:52:37AM +0800, robbieko wrote: > From: Robbie Ko > > This idea is from direct io. By this patch, we can make the buffered > write parallel, and improve the performance and latency. But because we > can not update isize without i_mutex, the

Re: [PATCH 01/12] block: convert bounce, q->bio_split to bioset_init()/mempool_init()

2018-05-22 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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

Re: [PATCH 08/12] target: convert to bioset_init()/mempool_init()

2018-05-22 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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

Re: [PATCH 09/12] fs: convert block_dev.c to bioset_init()

2018-05-22 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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

Re: [PATCH 11/12] xfs: convert to bioset_init()/mempool_init()

2018-05-22 Thread Christoph Hellwig
This creates a minor conflict with my iomap series, but that should be easy to merge if needed. Otherwise looks good: Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger

Re: [PATCH 12/12] block: Drop bioset_create()

2018-05-22 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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

Re: [RFC PATCH v2 00/12] get rid of GFP_ZONE_TABLE/BAD

2018-05-22 Thread Christoph Hellwig
This seems to be missing patch 1 and generally be in somewhat odd format. Can you try to resend it with git-send-email and against current Linus' tree? Also I'd suggest you do cleanups like adding and using __GFP_ZONE_MASK at the beginning of the series before doing any real changes. -- To

Re: [RFC PATCH v2 02/12] arch/x86/kernel/amd_gart_64: update usage of address zone modifiers

2018-05-22 Thread Christoph Hellwig
This code doesn't exist in current mainline. What kernel version is your patch against? On Mon, May 21, 2018 at 11:20:23PM +0800, Huaisheng Ye wrote: > From: Huaisheng Ye > > Use __GFP_ZONE_MASK to replace (__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32). > > ___GFP_DMA,

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-22 Thread Christoph Hellwig
On Mon, May 21, 2018 at 07:38:55PM -0400, Kent Overstreet wrote: > On Mon, May 21, 2018 at 02:24:32PM -0400, Mike Snitzer wrote: > > Every single data structure change in this series should be reviewed for > > unforeseen alignment consequences. Jens seemed to say that is > > worthwhile. Not sure

Re: [RFC PATCH v2 05/12] include/linux/dma-mapping: update usage of address zone modifiers

2018-05-21 Thread Christoph Hellwig
On Mon, May 21, 2018 at 11:20:26PM +0800, Huaisheng Ye wrote: > From: Huaisheng Ye > > Use __GFP_ZONE_MASK to replace (__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32). > > ___GFP_DMA, ___GFP_HIGHMEM and ___GFP_DMA32 have been deleted from GFP > bitmasks, the bottom three bits of GFP

Re: [PATCH 08/10] bcache: move closures to lib/

2018-05-18 Thread Christoph Hellwig
On Fri, May 18, 2018 at 03:49:13AM -0400, Kent Overstreet wrote: > Prep work for bcachefs - being a fork of bcache it also uses closures Hell no. This code needs to go away and not actually be promoted to lib/. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body

Re: [PATCH 10/10] Dynamic fault injection

2018-05-18 Thread Christoph Hellwig
On Fri, May 18, 2018 at 03:49:18AM -0400, Kent Overstreet wrote: > Signed-off-by: Kent Overstreet Completely lacks any explanation or argument why it would be useful. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to

Re: [PATCH 05/10] don't use spin_lock_irqsave() unnecessarily

2018-05-18 Thread Christoph Hellwig
On Fri, May 18, 2018 at 03:49:08AM -0400, Kent Overstreet wrote: > Signed-off-by: Kent Overstreet Looks generally fine. A little changelog with an explanation of how we obviously never could get here with irqs disabled would be nice, though. -- To unsubscribe from

Re: [PATCH 06/10] Generic radix trees

2018-05-18 Thread Christoph Hellwig
Completely lacks any explanation, including why this should be in lib/. Also should come in the same series with actual users of the infrastructure. -- 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

Re: [PATCH 02/10] mm: export find_get_pages()

2018-05-18 Thread Christoph Hellwig
On Fri, May 18, 2018 at 03:49:02AM -0400, Kent Overstreet wrote: > Signed-off-by: Kent Overstreet > --- > mm/filemap.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/filemap.c b/mm/filemap.c > index 31dd888785..78b99019bf 100644 > --- a/mm/filemap.c > +++

Re: [PATCH 01/10] mm: pagecache add lock

2018-05-18 Thread Christoph Hellwig
On Fri, May 18, 2018 at 06:13:06AM -0700, Matthew Wilcox wrote: > > Historically, the only problematic case has been direct IO, and people > > have been willing to say "well, if you mix buffered and direct IO you > > get what you deserve", and that's probably not unreasonable. But now we > > have

Re: [PATCH 14/14] mm: turn on vm_fault_t type checking

2018-05-16 Thread Christoph Hellwig
On Wed, May 16, 2018 at 08:08:29AM -0700, Darrick J. Wong wrote: > Uh, we're changing function signatures /and/ redefinining vm_fault_t? > All in the same 90K patch? > > I /was/ expecting a series of "convert X and all callers/users" > patches followed by a trivial one to switch the

Re: vm_fault_t conversion, for real

2018-05-16 Thread Christoph Hellwig
On Wed, May 16, 2018 at 06:22:56AM -0700, Matthew Wilcox wrote: > Perhaps you should try being less of an arsehole if you don't want to > get yelled at? I don't mind when you're an arsehole towards me, but I > do mind when you're an arsehole towards newcomers. How are we supposed > to attract

Re: [PATCH 14/14] mm: turn on vm_fault_t type checking

2018-05-16 Thread Christoph Hellwig
On Wed, May 16, 2018 at 04:28:13AM -0700, Matthew Wilcox wrote: > On Wed, May 16, 2018 at 07:43:48AM +0200, Christoph Hellwig wrote: > > Switch vm_fault_t to point to an unsigned int with __bіtwise annotations. > > This both catches any old ->fault or ->page_mkwrit

Re: vm_fault_t conversion, for real

2018-05-16 Thread Christoph Hellwig
On Wed, May 16, 2018 at 04:23:47AM -0700, Matthew Wilcox wrote: > On Wed, May 16, 2018 at 07:43:34AM +0200, Christoph Hellwig wrote: > > this series tries to actually turn vm_fault_t into a type that can be > > typechecked and checks the fallout instead of sprinkling random > >

Re: [PATCH 10/14] vgem: separate errno from VM_FAULT_* values

2018-05-16 Thread Christoph Hellwig
On Wed, May 16, 2018 at 11:53:03AM +0200, Daniel Vetter wrote: > Reviewed-by: Daniel Vetter > > Want me to merge this through drm-misc or plan to pick it up yourself? For now I just want a honest discussion if people really actually want the vm_fault_t change with the

vm_fault_t conversion, for real

2018-05-15 Thread Christoph Hellwig
Hi all, this series tries to actually turn vm_fault_t into a type that can be typechecked and checks the fallout instead of sprinkling random annotations without context. The first one fixes a real bug in orangefs, the second and third fix mismatched existing vm_fault_t annotations on the same

[PATCH 02/14] fs: make the filemap_page_mkwrite prototype consistent

2018-05-15 Thread Christoph Hellwig
!CONFIG_MMU version didn't agree with the rest of the kernel.. Signed-off-by: Christoph Hellwig <h...@lst.de> --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index 52517f28e6f4..cf21ced98eff 100644 --- a/mm/filemap.c ++

[PATCH 01/14] orangefs: don't return errno values from ->fault

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/orangefs/file.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 26358efbf794..b4a25cd4f3fa 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -528,18 +

[PATCH 03/14] dax: make the dax_iomap_fault prototype consistent

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/linux/dax.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/dax.h b/include/linux/dax.h index dc65ece825ee..a292bccdc274 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h @@ -183,7 +183,7 @

[PATCH 04/14] mm: remove the unused device_private_entry_fault export

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- kernel/memremap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/memremap.c b/kernel/memremap.c index db4e1a373e5f..59ee3b604b39 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -65,7 +65,6 @@ int device_private_entry

[PATCH 05/14] ceph: untangle ceph_filemap_fault

2018-05-15 Thread Christoph Hellwig
Streamline the code to have a somewhat natural flow, and separate the errno values from the VM_FAULT_* values. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/ceph/addr.c | 100 + 1 file changed, 51 insertions(+), 49 deletions(-) diff

[PATCH 06/14] btrfs: separate errno from VM_FAULT_* values

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/inode.c | 19 ++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 1485cd130e2b..02a0de73c1d1 100644 --- a/fs/btrfs/ctree.h ++

[PATCH 07/14] ext4: separate errno from VM_FAULT_* values

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/ext4/ext4.h | 4 ++-- fs/ext4/inode.c | 30 +++--- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index fa52b7dd4542..48592d0edf3e 100644 --- a/fs/ext4/ext4.h ++

[PATCH 10/14] vgem: separate errno from VM_FAULT_* values

2018-05-15 Thread Christoph Hellwig
And streamline the code in vgem_fault with early returns so that it is a little bit more readable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/gpu/drm/vgem/vgem_drv.c | 51 +++-- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/d

[PATCH 09/14] ubifs: separate errno from VM_FAULT_* values

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/ubifs/file.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 1acb2ff505e6..7c1a2e1c3de5 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1513,7 +1513,7 @@ stat

[PATCH 11/14] ttm: separate errno from VM_FAULT_* values

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 42 + 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 8eba95b3c737..255e7801f62c

[PATCH 12/14] lustre: separate errno from VM_FAULT_* values

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- .../staging/lustre/lustre/llite/llite_mmap.c | 37 +++ .../lustre/lustre/llite/vvp_internal.h| 2 +- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_mma

[PATCH 13/14] mm: move arch specific VM_FAULT_* flags to mm.h

2018-05-15 Thread Christoph Hellwig
Various architectures define their own internal flags. Not sure a public header like mm.h is a good place, but keeping them inside the arch code with possible conflicts also seems like a bad idea. Maybe we just need to stop overloading the value instead. Signed-off-by: Christoph Hellwig &l

[PATCH 08/14] ocfs2: separate errno from VM_FAULT_* values

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/ocfs2/mmap.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index fb9a20e3d608..e75c1fc5333e 100644 --- a/fs/ocfs2/mmap.c +++ b/fs/ocfs2/

[PATCH 14/14] mm: turn on vm_fault_t type checking

2018-05-15 Thread Christoph Hellwig
Switch vm_fault_t to point to an unsigned int with __bіtwise annotations. This both catches any old ->fault or ->page_mkwrite instance with plain compiler type checking, as well as finding more intricate problems with sparse. Signed-off-by: Christoph Hellwig <h...@lst.de> --- a

Re: btrfs space used issue

2018-03-05 Thread Christoph Hellwig
On Sat, Mar 03, 2018 at 06:59:26AM +, Duncan wrote: > Indeed. Preallocation with COW doesn't make the sense it does on an > overwrite-in-place filesystem. It makes a whole lot of sense, it just is a little harder to implement. There is no reason not to preallocate specific space, or if you

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

2017-12-29 Thread Christoph Hellwig
On Sat, Dec 16, 2017 at 04:07:23AM -0800, Tejun Heo wrote: > Note that this makes blk_abort_request() asynchronous - it initiates > abortion but the actual termination will happen after a short while, > even when the caller owns the request. AFAICS, SCSI and ATA should be > fine with that and I

Re: [PATCH 1/7] blk-mq: protect completion path with RCU

2017-12-29 Thread Christoph Hellwig
Why do you need the srcu protection? The completion path can never sleep. If there is a good reason to keep it please add commment, and make the srcu variant a separate function only used by drivers that need it instead of adding the conditional. -- To unsubscribe from this list: send the line

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

2017-12-29 Thread Christoph Hellwig
This seems to miss the linux-block list once again. Please include it in the next resend. -- 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

Re: qemu-kvm VM died during partial raid1 problems of btrfs

2017-09-12 Thread Christoph Hellwig
On Tue, Sep 12, 2017 at 08:43:59PM +0200, Adam Borowski wrote: > For now, though, I wonder -- should we send fine folks at util-linux a patch > to make fallocate -d restore mtime, either always or on an option? Don't do that. Please just add a new ioctl or fallocate command that punches a hole

Re: [PATCH] Btrfs: do not reset bio->bi_ops while writing bio

2017-08-25 Thread Christoph Hellwig
On Thu, Aug 24, 2017 at 11:04:40AM -0700, Liu Bo wrote: > On Thu, Aug 24, 2017 at 07:10:41AM -0700, Christoph Hellwig wrote: > > On Wed, Aug 23, 2017 at 12:15:09PM -0600, Liu Bo wrote: > > > flush_epd_write_bio() sets bio->bi_ops by itself to honor REQ_SYNC, > > > bu

Re: [PATCH] Btrfs: do not reset bio->bi_ops while writing bio

2017-08-24 Thread Christoph Hellwig
On Wed, Aug 23, 2017 at 12:15:09PM -0600, Liu Bo wrote: > flush_epd_write_bio() sets bio->bi_ops by itself to honor REQ_SYNC, > but it's not needed at all since bio->bi_ops has set up properly in > both __extent_writepage() and write_one_eb(), and in the case of > write_one_eb(), it also sets

Re: [PATCH 2/6] raid5: remove a call to get_start_sect

2017-08-24 Thread Christoph Hellwig
On Wed, Aug 23, 2017 at 11:23:38AM -0700, Shaohua Li wrote: > On Wed, Aug 23, 2017 at 07:10:28PM +0200, Christoph Hellwig wrote: > > The block layer always remaps partitions before calling into the > > ->make_request methods of drivers. Thus the call to get_start_sect in >

Re: don't require a struct block_device to submit a bio

2017-08-23 Thread Christoph Hellwig
Patch 6 didn't seem to make it through to the list, so here is a link to the git tree: http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/bi_bdev -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More

[PATCH 4/6] block: add a __disk_get_part helper

2017-08-23 Thread Christoph Hellwig
This helper allows looking up a partion under RCU protection without grabbing a reference to it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/blk.h | 2 ++ block/genhd.c | 26 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/block/b

[PATCH 2/6] raid5: remove a call to get_start_sect

2017-08-23 Thread Christoph Hellwig
The block layer always remaps partitions before calling into the ->make_request methods of drivers. Thus the call to get_start_sect in in_chunk_boundary will always return 0 and can be removed. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/raid5.c | 4 +++- 1 file c

[PATCH 5/6] block: cache the partition index in struct block_device

2017-08-23 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/block_dev.c | 1 + include/linux/fs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/block_dev.c b/fs/block_dev.c index 9941dc8342df..d29d1c70f833 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1451,6 +1451,7 @@ stat

don't require a struct block_device to submit a bio

2017-08-23 Thread Christoph Hellwig
Hi Jens, this series removes the need to have a struct block_device ready to submit a bio. We basically don't use it anywhere in the block stack anyway - we always go for the gendisk or request_queue. The only exception is partition remapping for which we'll now need an additional partition

[PATCH 1/6] btrfs: index check-integrity state hash by a dev_t

2017-08-23 Thread Christoph Hellwig
We won't have the struct block_device available in the bio soon, so switch to the numerical dev_t instead of the block_device pointer for looking up the check-integrity state. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/btrfs/check-integrity.c | 31 +---

[PATCH 3/6] block: reject attempts to allocate more than DISK_MAX_PARTS partitions

2017-08-23 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/genhd.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block/genhd.c b/block/genhd.c index 2367087cdb7c..3380a1e73ea0 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1357,6 +1357,13 @@ struct gendisk *alloc_disk_no

Re: RedHat 7.4 Release Notes: "Btrfs has been deprecated" - wut?

2017-08-12 Thread Christoph Hellwig
On Sat, Aug 12, 2017 at 02:10:18AM +0200, Christoph Anton Mitterer wrote: > Qu Wenruo wrote: > >Although Btrfs can disable data CoW, nodatacow also disables data  > >checksum, which is another main feature for btrfs. > > Then decoupling of the two should probably decoupled and support for >

Re: [PATCH v3 11/49] btrfs: avoid access to .bi_vcnt directly

2017-08-10 Thread Christoph Hellwig
> +static unsigned int get_bio_pages(struct bio *bio) > +{ > + unsigned i; > + struct bio_vec *bv; > + > + bio_for_each_segment_all(bv, bio, i) > + ; > + > + return i; > +} s/get_bio_pages/bio_nr_pages/ ? Also this seems like a useful helper for bio.h -- To

Re: [PATCH] btrfs: Remove extra parentheses from condition in copy_items()

2017-07-27 Thread Christoph Hellwig
> - if ((i == (nr - 1))) > + if (i == (nr - 1)) Please remove the other set of redundant parentheses as well if you change that line. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More

Re: [GIT PULL] Btrfs for 4.13

2017-07-05 Thread Christoph Hellwig
On Wed, Jul 05, 2017 at 04:45:49PM -0700, Linus Torvalds wrote: > Ouch, yeah, that was annoying. And yes, I ended up with several > whitespace differences but other than that it looks the same. Oh well. > > Jens, Christoph, let's not do that stupid thing with status-vs-error > ever again, ok? It

Re: [proposal] making filesystem tools more machine friendly

2017-07-05 Thread Christoph Hellwig
Hi Jan, I really like the idea out json output for fs/block tools. nvme-cli has been doing it for a while, and that has been very useful. It comes with it's own little handrolled json output helpers: https://github.com/linux-nvme/nvme-cli/blob/master/json.c so it doesn't introduce any

Re: [PATCH v8 17/18] xfs: minimal conversion to errseq_t writeback error reporting

2017-06-30 Thread Christoph Hellwig
On Fri, Jun 30, 2017 at 12:45:54PM -0400, Jeff Layton wrote: > Should I aim to do that with an individual patch for each fs, or is it > better to do a swath of them all at once in a single patch here? I'd be perfectly happy with one big patch for all the trivial conversions. -- To unsubscribe

Re: [PATCH v8 03/18] fs: check for writeback errors after syncing out buffers in generic_file_fsync

2017-06-29 Thread Christoph Hellwig
On Thu, Jun 29, 2017 at 09:19:39AM -0400, jlay...@kernel.org wrote: > From: Jeff Layton > > ext2 currently does a test+clear of the AS_EIO flag, which is > is problematic for some coming changes. > > What we really need to do instead is call filemap_check_errors > in

Re: [PATCH v8 14/18] block: convert to errseq_t based writeback error tracking

2017-06-29 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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

Re: [PATCH v8 18/18] btrfs: minimal conversion to errseq_t writeback error reporting on fsync

2017-06-29 Thread Christoph Hellwig
On Thu, Jun 29, 2017 at 09:19:54AM -0400, jlay...@kernel.org wrote: > From: Jeff Layton > > Just check and advance the errseq_t in the file before returning. > Internal callers of filemap_* functions are left as-is. > > Signed-off-by: Jeff Layton > --- >

Re: [PATCH v8 17/18] xfs: minimal conversion to errseq_t writeback error reporting

2017-06-29 Thread Christoph Hellwig
Nice and simple, this looks great! Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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

Re: [PATCH v8 16/18] ext4: use errseq_t based error handling for reporting data writeback errors

2017-06-29 Thread Christoph Hellwig
> - if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb > - return -EIO; > + if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb { > + ret = -EIO; > + goto out; > + } This just seems to add a call to trace_ext4_sync_file_exit for this

Re: [PATCH v7 16/22] block: convert to errseq_t based writeback error tracking

2017-06-27 Thread Christoph Hellwig
On Mon, Jun 26, 2017 at 10:34:18AM -0400, Jeff Layton wrote: > The bigger question is -- what about more complex filesystems like > ext4? There are a couple of cases where we can return -EIO or -EROFS on > fsync before filemap_write_and_wait_range is ever called. Like this one > for instance: >

Re: [PATCH v7 16/22] block: convert to errseq_t based writeback error tracking

2017-06-24 Thread Christoph Hellwig
On Tue, Jun 20, 2017 at 01:44:44PM -0400, Jeff Layton wrote: > In order to query for errors with errseq_t, you need a previously- > sampled point from which to check. When you call > filemap_write_and_wait_range though you don't have a struct file and so > no previously-sampled value. So can we

Re: [PATCH v7 16/22] block: convert to errseq_t based writeback error tracking

2017-06-20 Thread Christoph Hellwig
> error = filemap_write_and_wait_range(filp->f_mapping, start, end); > if (error) > - return error; > + goto out; > > /* >* There is no need to serialise calls to blkdev_issue_flush with > @@ -640,6 +640,10 @@ int blkdev_fsync(struct file *filp,

Re: [PATCH v7 11/22] fs: new infrastructure for writeback error handling and reporting

2017-06-20 Thread Christoph Hellwig
> @@ -393,6 +394,7 @@ struct address_space { > gfp_t gfp_mask; /* implicit gfp mask for > allocations */ > struct list_headprivate_list; /* ditto */ > void*private_data; /* ditto */ > + errseq_twb_err; >

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

2017-06-20 Thread Christoph Hellwig
On Fri, Jun 16, 2017 at 03:34:06PM -0400, Jeff Layton wrote: > Requested-by: Christoph Hellwig <h...@infradead.org> > Signed-off-by: Jeff Layton <jlay...@redhat.com> Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list: send the line

Re: [PATCH] btrfs: use new block error code

2017-06-20 Thread Christoph Hellwig
<dan.carpen...@oracle.com> Looks fine, Acked-by: Christoph Hellwig <h...@lst.de> -- 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

Re: [PATCH v6 12/20] fs: add a new fstype flag to indicate how writeback errors are tracked

2017-06-15 Thread Christoph Hellwig
On Thu, Jun 15, 2017 at 06:42:12AM -0400, Jeff Layton wrote: > Correct. > > But if there is a data writeback error, should we report an error on all > open fds at that time (like we will for fsync)? We should in theory, but I don't see how to properly do it. In addition sync_file_range just

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

2017-06-15 Thread Christoph Hellwig
On Thu, Jun 15, 2017 at 12:11:58PM +0100, Al Viro wrote: > Which flags are you talking about? aio ones? AFAICS, it's the same > kind of thing as "can we lseek?" or "can we read/pread?", etc. > What would that field look like? Note that some of those might depend > upon the flags passed to

Re: [PATCH v6 12/20] fs: add a new fstype flag to indicate how writeback errors are tracked

2017-06-15 Thread Christoph Hellwig
On Wed, Jun 14, 2017 at 01:24:43PM -0400, Jeff Layton wrote: > In this smaller set, it's only really used for DAX. DAX only is implemented by three filesystems, please just fix them up in one go. > sync_file_range: ->fsync isn't called directly there, and I think we > probably want similar

Re: [PATCH v6 12/20] fs: add a new fstype flag to indicate how writeback errors are tracked

2017-06-14 Thread Christoph Hellwig
On Tue, Jun 13, 2017 at 06:24:32AM -0400, Jeff Layton wrote: > That's definitely what I want for the endgame here. My plan was to add > this flag for now, and then eventually reverse it (or drop it) once all > or most filesystems are converted. > > We can do it that way from the get-go if you

Re: [PATCH] btrfs: use ino_t for inode in tracer

2017-06-13 Thread Christoph Hellwig
I thought btrfs supports 64-bit inodes, in which case this will truncate the inode number on 32-bit architectures. -- 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

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

2017-06-13 Thread Christoph Hellwig
On Mon, Jun 12, 2017 at 05:38:13PM -0500, Goldwyn Rodrigues wrote: > We had FS_NOWAIT in filesystem type flags (in v3), but retracted it > later in v4. A per-fs flag is wrong as file_operation may have different capabilities. > I will work on adding FMODE_AIO_NOWAIT in the meantime. If Al

Re: [PATCH v6 14/20] dax: set errors in mapping when writeback fails

2017-06-12 Thread Christoph Hellwig
On Mon, Jun 12, 2017 at 08:23:10AM -0400, Jeff Layton wrote: > For now, only do this when the FS_WB_ERRSEQ flag is set. The > AS_EIO/AS_ENOSPC flags are not currently cleared in the older code when > writeback initiation fails, only when we discover an error after waiting > on writeback to

Re: [PATCH v6 12/20] fs: add a new fstype flag to indicate how writeback errors are tracked

2017-06-12 Thread Christoph Hellwig
On Mon, Jun 12, 2017 at 08:23:06AM -0400, Jeff Layton wrote: > Add a new FS_WB_ERRSEQ flag to the fstype. Later patches will set and > key off of that to decide what behavior should be used. Please invert this so that only file systems that keep the old semantics need a flag. -- To unsubscribe

Re: [PATCH v6 15/20] fs: have call_fsync call filemap_report_wb_err if FS_WB_ERRSEQ is set

2017-06-12 Thread Christoph Hellwig
On Mon, Jun 12, 2017 at 08:23:11AM -0400, Jeff Layton wrote: > Allow filesystems to opt-in to a final check of wb_err if FS_WB_ERRSEQ > is set. Technically, we could just plumb these calls into all of the > fsync operations, but I think this means less code, changes and churn. Please add it to

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

2017-06-08 Thread Christoph Hellwig
As already indicated this whole series looks fine to me. Al: are you going to pick this up? Or Andrew? On Tue, Jun 06, 2017 at 06:19:29AM -0500, Goldwyn Rodrigues wrote: > This series adds nonblocking feature to asynchronous I/O writes. > io_submit() can be delayed because of a number of

Re: [PATCH 1/8] btrfs: bioset allocations will never fail, adapt our helpers

2017-06-06 Thread Christoph Hellwig
On Tue, Jun 06, 2017 at 06:21:17PM +0800, Anand Jain wrote: > > > On 06/03/17 00:58, David Sterba wrote: >> Christoph pointed out that bio allocations backed by a bioset will never >> fail. > > David, > > Looks like this feature comes when __GFP_DIRECT_RECLAIM is > set and we aren't, such as

[PATCH 06/13] fs: simplify dio_bio_complete

2017-06-03 Thread Christoph Hellwig
Only read bio->bi_error once in the common path. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> --- fs/direct-io.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/direct-io.c b/fs/di

[PATCH 10/13] dm: change ->end_io calling convention

2017-06-03 Thread Christoph Hellwig
Turn the error paramter into a pointer so that target drivers can change the value, and make sure only DM_ENDIO_* values are returned from the methods. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/dm-cache-target.c | 4 ++-- drivers/md/dm-flakey.c| 8 d

[PATCH 12/13] blk-mq: switch ->queue_rq return value to blk_status_t

2017-06-03 Thread Christoph Hellwig
Use the same values for use for request completion errors as the return value from ->queue_rq. BLK_STS_RESOURCE is special cased to cause a requeue, and all the others are completed as-is. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/blk-mq.c

[PATCH 08/13] dm mpath: merge do_end_io_bio into multipath_end_io_bio

2017-06-03 Thread Christoph Hellwig
This simplifies the code and especially the error passing a bit and will help with the next patch. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/dm-mpath.c | 42 +++--- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/driv

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

2017-06-03 Thread Christoph Hellwig
Instead of reinventing it poorly. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> Reviewed-by: Javier González <jav...@cnexlabs.com> --- drivers/nvme/host/lightnvm.c | 12 +--- 1 file changed, 1 insertion(+), 11

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

2017-06-03 Thread Christoph Hellwig
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 account when returning the errno. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/block_dev.c | 7 --- 1 file chan

[PATCH 09/13] dm: don't return errnos from ->map

2017-06-03 Thread Christoph Hellwig
to start with to make guaranteed progress). Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/dm-crypt.c | 4 ++-- drivers/md/dm-flakey.c| 4 ++-- drivers/md/dm-integrity.c | 12 ++-- drivers/md/dm-log-writes.c| 4 ++-- drivers/md/dm-m

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

2017-06-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> --- fs/btrfs/inode.c | 6 +++--- fs/direct-io.c | 3 +-- include/linux/fs.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/b

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

2017-06-03 Thread Christoph Hellwig
We will only have sense data if the command executed and got a SCSI result, so this is pointless. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- drivers/scsi/osd/osd_initiator.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 04/13] dm: fix REQ_RAHEAD handling

2017-06-03 Thread Christoph Hellwig
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. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> --- d

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

2017-06-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> --- fs/gfs2/incore.h | 1 - fs/gfs2/lops.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index b7cf65d13561..aa3d445

  1   2   3   4   5   6   7   >