Re: [Lsf-pc] [LSF/MM TOPIC] Badblocks checking/representation in filesystems

2017-01-18 Thread Darrick J. Wong
On Wed, Jan 18, 2017 at 03:39:17PM -0500, Jeff Moyer wrote: > Jan Kara writes: > > > On Tue 17-01-17 15:14:21, Vishal Verma wrote: > >> Your note on the online repair does raise another tangentially related > >> topic. Currently, if there are badblocks, writes via the bio

Re: [LSF/MM TOPIC] Future direction of DAX

2017-01-16 Thread Darrick J. Wong
On Mon, Jan 16, 2017 at 03:00:41PM -0500, Jeff Moyer wrote: > "Darrick J. Wong" <darrick.w...@oracle.com> writes: > > >> - Whenever you mount a filesystem with DAX, it spits out a message that > >> says > >> "DAX enabled. Warning: EXP

Re: [PATCH 05/12] fs: add a F_IOINFO fcntl

2017-02-28 Thread Darrick J. Wong
On Tue, Feb 28, 2017 at 06:57:30AM -0800, Christoph Hellwig wrote: > This fcntl can be used to query I/O parameters for the given file > descriptor. Initially it is used for the I/O alignment and atomic > write parameters. > > Signed-off-by: Christoph Hellwig > --- > fs/fcntl.c

Re: [PATCH 07/12] xfs: implement failure-atomic writes

2017-02-28 Thread Darrick J. Wong
On Tue, Feb 28, 2017 at 06:57:32AM -0800, Christoph Hellwig wrote: > If O_ATOMIC is specified in the open flags this will cause XFS to > allocate new extents in the COW for even if overwriting existing data, "COW fork"^^^ The previous patch's commit message also has that

Re: [RFC] failure atomic writes for file systems and block devices

2017-02-28 Thread Darrick J. Wong
On Tue, Feb 28, 2017 at 06:57:25AM -0800, Christoph Hellwig wrote: > Hi all, > > this series implements a new O_ATOMIC flag for failure atomic writes > to files. It is based on and tries to unify to earlier proposals, > the first one for block devices by Chris Mason: > >

[PATCH 3/3] block: implement (some of) fallocate for block devices

2016-09-29 Thread Darrick J. Wong
. The other fallocate variants (collapse range, insert range, and allocate blocks) are not supported. Signed-off-by: Darrick J. Wong <darrick.w...@oracle.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> --- fs/

[PATCH 2/3] block: require write_same and discard requests align to logical block size

2016-08-25 Thread Darrick J. Wong
writes. Signed-off-by: Darrick J. Wong <darrick.w...@oracle.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- block/blk-lib.c | 15 +++

[PATCH 3/3] block: implement (some of) fallocate for block devices

2016-08-25 Thread Darrick J. Wong
v3: Forward port to 4.7. Signed-off-by: Darrick J. Wong <darrick.w...@oracle.com> --- fs/block_dev.c | 84 fs/open.c |3 +- 2 files changed, 86 insertions(+), 1 deletion(-) diff --git a/fs/block_dev.c b/fs/block_dev.c ind

[PATCH 1/3] block: invalidate the page cache when issuing BLKZEROOUT.

2016-09-28 Thread Darrick J. Wong
Invalidate the page cache (as a regular O_DIRECT write would do) to avoid returning stale cache contents at a later time. Signed-off-by: Darrick J. Wong <darrick.w...@oracle.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.

Re: [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-09-28 Thread Darrick J. Wong
On Wed, Sep 28, 2016 at 06:42:14PM -0700, Bart Van Assche wrote: > On 09/28/16 17:39, Darrick J. Wong wrote: > >+if (end > isize) { > >+if (mode & FALLOC_FL_KEEP_SIZE) { > >+len = isize - start; > >+

[PATCH v2 3/3] block: implement (some of) fallocate for block devices

2016-09-28 Thread Darrick J. Wong
. The other fallocate variants (collapse range, insert range, and allocate blocks) are not supported. Signed-off-by: Darrick J. Wong <darrick.w...@oracle.com> --- v2: Incorporate feedback from Christoph & Linus. Tentatively add a requirement that the fallocate arguments be aligned to logical

Re: [PATCH v2 3/3] block: implement (some of) fallocate for block devices

2016-09-29 Thread Darrick J. Wong
On Thu, Sep 29, 2016 at 01:08:57PM -0700, Bart Van Assche wrote: > On 09/28/2016 07:19 PM, Darrick J. Wong wrote: > >After much discussion, it seems that the fallocate feature flag > >FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature > >FALLOC_FL_P

[PATCH v11 0/3] fallocate for block devices

2016-09-29 Thread Darrick J. Wong
Hi Andrew & others, This is a resend of the patchset to fix page cache coherency with BLKZEROOUT and implement fallocate for block devices. This time I'm sending it direct to Andrew for inclusion because the block layer maintainer has not been responsive over the past year of submissions. Can

[PATCH 2/3] block: require write_same and discard requests align to logical block size

2016-09-29 Thread Darrick J. Wong
writes. Signed-off-by: Darrick J. Wong <darrick.w...@oracle.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes Reinecke <h...@sus

[PATCH 1/3] block: invalidate the page cache when issuing BLKZEROOUT.

2016-09-29 Thread Darrick J. Wong
Invalidate the page cache (as a regular O_DIRECT write would do) to avoid returning stale cache contents at a later time. Signed-off-by: Darrick J. Wong <darrick.w...@oracle.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracl

[PATCH 3/3] block: implement (some of) fallocate for block devices

2016-09-28 Thread Darrick J. Wong
. The other fallocate variants (collapse range, insert range, and allocate blocks) are not supported. Signed-off-by: Darrick J. Wong <darrick.w...@oracle.com> --- v2: Incorporate feedback from Christoph & Linus. Tentatively add a requirement that the fallocate arguments be aligned to logical

[PATCH 2/3] block: require write_same and discard requests align to logical block size

2016-09-28 Thread Darrick J. Wong
writes. Signed-off-by: Darrick J. Wong <darrick.w...@oracle.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- block/blk-lib.c | 15 +++

Re: [PATCH 7/8] nowait aio: xfs

2017-04-06 Thread Darrick J. Wong
On Mon, Apr 03, 2017 at 11:52:11PM -0700, Christoph Hellwig wrote: > > + if (unaligned_io) { > > + /* If we are going to wait for other DIO to finish, bail */ > > + if ((iocb->ki_flags & IOCB_NOWAIT) && > > +atomic_read(>i_dio_count)) > > +

Re: [PATCH 7/8] nowait aio: xfs

2017-04-07 Thread Darrick J. Wong
On Fri, Apr 07, 2017 at 06:34:28AM -0500, Goldwyn Rodrigues wrote: > > > On 04/06/2017 05:54 PM, Darrick J. Wong wrote: > > On Mon, Apr 03, 2017 at 11:52:11PM -0700, Christoph Hellwig wrote: > >>> + if (unaligned_io) { > >>> + /* If we are goin

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

2017-06-29 Thread Darrick J. Wong
; > Signed-off-by: Jeff Layton <jlay...@redhat.com> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/xfs/xfs_file.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c &g

Re: [PATCH v8 12/18] Documentation: flesh out the section in vfs.txt on storing and reporting writeback errors

2017-06-29 Thread Darrick J. Wong
On Thu, Jun 29, 2017 at 09:19:48AM -0400, jlay...@kernel.org wrote: > From: Jeff Layton > > Let's try to make this extra clear for fs authors. > > Cc: Jan Kara > Signed-off-by: Jeff Layton > --- > Documentation/filesystems/vfs.txt | 43 >

Re: [xfstests PATCH v2 2/3] ext4: allow ext4 to use $SCRATCH_LOGDEV

2017-05-15 Thread Darrick J. Wong
infrastructure for this (a'la $SCRATCH_LOGDEV), so wire > up the ext4 code so that it can do the same thing when _scratch_mkfs is > called. > > Signed-off-by: Jeff Layton <jlay...@redhat.com> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > comm

Re: [PATCH 7/9] xfs: add support for passing in write hints for buffered writes

2017-06-20 Thread Darrick J. Wong
On Tue, Jun 20, 2017 at 06:22:04PM -0600, Jens Axboe wrote: > Reviewed-by: Andreas Dilger <adil...@dilger.ca> > Signed-off-by: Jens Axboe <ax...@kernel.dk> Looks ok to me, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/xfs/xfs_aops

Re: [PATCH v7 21/22] xfs: minimal conversion to errseq_t writeback error reporting

2017-06-26 Thread Darrick J. Wong
map_report_wb_err has side effects? Pre-coffee me was wondering why we'd bother calling filemap_report_wb_err in the XFS_FORCED_SHUTDOWN case, then remembered that it touches data structures. The first sentence of the commit message (really, the word 'advance') added as a comment was adequate to r

Re: [PATCH 1/9] fs: add fcntl() interface for setting/getting write life time hints

2017-06-26 Thread Darrick J. Wong
On Mon, Jun 26, 2017 at 07:55:27AM -0600, Jens Axboe wrote: > On 06/26/2017 03:51 AM, Christoph Hellwig wrote: > > Please document the userspace API (added linux-api and linux-man > > to CC for sugestions), especially including the odd effects of the > > per-inode settings. > > Of course, I'll

Re: [PATCH v7 21/22] xfs: minimal conversion to errseq_t writeback error reporting

2017-06-26 Thread Darrick J. Wong
On Mon, Jun 26, 2017 at 01:58:32PM -0400, jlay...@redhat.com wrote: > On Mon, 2017-06-26 at 08:22 -0700, Darrick J. Wong wrote: > > On Fri, Jun 16, 2017 at 03:34:26PM -0400, Jeff Layton wrote: > > > Just check and advance the data errseq_t in struct file before > > >

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

2017-05-24 Thread Darrick J. Wong
needs allocation either due to file extension, writing to a hole, > or COW or waiting for other DIOs to finish. > > Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com> > Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Darrick J. Wong <darrick.w

Re: [xfstests PATCH v3 1/5] generic: add a writeback error handling test

2017-06-06 Thread Darrick J. Wong
On Tue, Jun 06, 2017 at 04:12:58PM -0400, Jeff Layton wrote: > On Tue, 2017-06-06 at 10:17 -0700, Darrick J. Wong wrote: > > On Tue, Jun 06, 2017 at 08:23:25PM +0800, Eryu Guan wrote: > > > On Tue, Jun 06, 2017 at 06:15:57AM -0400, Jeff Layton wrote: > > > > On Tue, 2

Re: [PATCH 04/11] fs: add support for allowing applications to pass in write life time hints

2017-06-14 Thread Darrick J. Wong
On Wed, Jun 14, 2017 at 09:45:05PM -0600, Jens Axboe wrote: > Add four flags for the pwritev2(2) system call, allowing an application > to give the kernel a hint about what on-media life times can be > expected from a given write. > > The intent is for these values to be relative to each other,

Re: [PATCH v6 19/20] xfs: minimal conversion to errseq_t writeback error reporting

2017-06-12 Thread Darrick J. Wong
On Mon, Jun 12, 2017 at 08:23:15AM -0400, Jeff Layton wrote: > Just set the FS_WB_ERRSEQ flag to indicate that we want to use errseq_t > based error reporting. Internal filemap_* calls are left as-is for now. > > Signed-off-by: Jeff Layton > --- > fs/xfs/xfs_super.c | 2 +- >

Re: [xfstests PATCH v3 1/5] generic: add a writeback error handling test

2017-06-06 Thread Darrick J. Wong
On Tue, Jun 06, 2017 at 08:23:25PM +0800, Eryu Guan wrote: > On Tue, Jun 06, 2017 at 06:15:57AM -0400, Jeff Layton wrote: > > On Tue, 2017-06-06 at 16:58 +0800, Eryu Guan wrote: > > > On Wed, May 31, 2017 at 09:08:16AM -0400, Jeff Layton wrote: > > > > I'm working on a set of kernel patches to

Re: [PATCH 3/4] blk-wbt: pass in enum wbt_flags to get_rq_wait()

2018-05-07 Thread Darrick J. Wong
ks ok (having not run any kind of testing on this yet), Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > block/blk-wbt.c | 25 +++-- > block/blk-wbt.h | 4 +++- > 2 files changed, 18 insertions(+), 11 deletions(-) > > diff --gi

Re: [PATCH 1/4] block: break discard submissions into the user defined size

2018-05-07 Thread Darrick J. Wong
On Mon, May 07, 2018 at 10:13:32AM -0600, Jens Axboe wrote: > Don't build discards bigger than what the user asked for, if the > user decided to limit the size by writing to 'discard_max_bytes'. > > Signed-off-by: Jens Axboe <ax...@kernel.dk> Seems fine to me, Reviewed-b

Re: [PATCH 2/4] blk-wbt: account any writing command as a write

2018-05-07 Thread Darrick J. Wong
d-off-by: Jens Axboe <ax...@kernel.dk> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > block/blk-wbt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/blk-wbt.c b/block/blk-wbt.c > index f92fc84b5e2c..3e3

Re: [PATCH 4/4] blk-wbt: throttle discards like background writes

2018-05-07 Thread Darrick J. Wong
rnel.dk> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > block/blk-stat.h | 6 +++--- > block/blk-wbt.c | 43 ++- > block/blk-wbt.h | 4 +++- > 3 files changed, 32 insertions(+), 21 deletions(-) > >

Re: [PATCH 10/33] iomap: add an iomap-based bmap implementation

2018-05-09 Thread Darrick J. Wong
On Wed, May 09, 2018 at 09:48:07AM +0200, Christoph Hellwig wrote: > This adds a simple iomap-based implementation of the legacy ->bmap > interface. Note that we can't easily add checks for rt or reflink > files, so these will have to remain in the callers. This interface > just needs to die..

Re: [PATCH 10/33] iomap: add an iomap-based bmap implementation

2018-05-10 Thread Darrick J. Wong
On Thu, May 10, 2018 at 08:42:50AM +0200, Christoph Hellwig wrote: > On Wed, May 09, 2018 at 09:46:28AM -0700, Darrick J. Wong wrote: > > On Wed, May 09, 2018 at 09:48:07AM +0200, Christoph Hellwig wrote: > > > This adds a simple iomap-based implementation of the legacy ->

Re: stop using buffer heads in xfs and iomap

2018-05-10 Thread Darrick J. Wong
On Wed, May 09, 2018 at 09:47:57AM +0200, Christoph Hellwig wrote: > Hi all, > > this series adds support for reading blocks from disk using the iomap > interface, and then gradually switched the buffered I/O path to not > require buffer heads. It has survived xfstests for 1k and 4k block >

Re: [PATCH 10/33] iomap: add an iomap-based bmap implementation

2018-05-11 Thread Darrick J. Wong
On Fri, May 11, 2018 at 08:25:27AM +0200, Christoph Hellwig wrote: > On Thu, May 10, 2018 at 08:08:38AM -0700, Darrick J. Wong wrote: > > > > > + sector_t *bno = data; > > > > > + > > > > > + if (iomap->type == IOMAP_MAPPED) > > >

Re: stop using buffer heads in xfs and iomap

2018-05-11 Thread Darrick J. Wong
On Fri, May 11, 2018 at 08:22:08AM +0200, Christoph Hellwig wrote: > On Thu, May 10, 2018 at 08:13:03AM -0700, Darrick J. Wong wrote: > > I ran xfstests on this for fun last night but hung in g/095: > > > > FSTYP -- xfs (debug) > > PLATFORM -- Linux/x8

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

2018-05-21 Thread Darrick J. Wong
On Sun, May 20, 2018 at 06:25:57PM -0400, Kent Overstreet wrote: > Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> Looks ok, I guess... Acked-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/xfs/xfs_aops.c | 2 +- > fs/xfs/xfs_aops.h | 2 +- &g

Re: [PATCH 05/34] fs: use ->is_partially_uptodate in page_cache_seek_hole_data

2018-05-21 Thread Darrick J. Wong
On Fri, May 18, 2018 at 06:48:01PM +0200, Christoph Hellwig wrote: > This way the implementation doesn't depend on buffer_head internals. > > Signed-off-by: Christoph Hellwig > --- > fs/iomap.c | 83 +++--- > 1 file changed, 42

Re: buffered I/O without buffer heads in xfs and iomap v2

2018-05-21 Thread Darrick J. Wong
On Fri, May 18, 2018 at 06:47:56PM +0200, Christoph Hellwig wrote: > Hi all, > > this series adds support for buffered I/O without buffer heads to > the iomap and XFS code. > > For now this series only contains support for block size == PAGE_SIZE, > with the 4k support split into a separate

Re: [PATCH 16/34] iomap: add initial support for writes without buffer heads

2018-05-21 Thread Darrick J. Wong
On Fri, May 18, 2018 at 06:48:12PM +0200, Christoph Hellwig wrote: > For now just limited to blocksize == PAGE_SIZE, where we can simply read > in the full page in write begin, and just set the whole page dirty after > copying data into it. This code is enabled by default and XFS will now > be

Re: [PATCH 0/3 v3] iomap: Use FUA for O_DSYNC DIO writes

2018-05-02 Thread Darrick J. Wong
arc.info/?l=linux-xfs=152213446528167=2 Will test the whole series, consider this a tentative: Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > > Version 3: > > - fixed O_SYNC behaviour as noticed by Jan Kara > - fixed use after free on IO completion due > i

Re: [PATCH 2/2] xfs: add 'discard_sync' mount flag

2018-04-30 Thread Darrick J. Wong
On Mon, Apr 30, 2018 at 04:40:04PM -0600, Jens Axboe wrote: > On 4/30/18 4:28 PM, Dave Chinner wrote: > > On Mon, Apr 30, 2018 at 03:42:11PM -0600, Jens Axboe wrote: > >> On 4/30/18 3:31 PM, Dave Chinner wrote: > >>> On Mon, Apr 30, 2018 at 09:32:52AM -0600, Jens Axboe wrote: > XFS recently

Re: [PATCH v5] Return bytes transferred for partial direct I/O

2018-01-04 Thread Darrick J. Wong
On Wed, Nov 22, 2017 at 06:29:01AM -0600, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > In case direct I/O encounters an error midway, it returns the error. > Instead it should be returning the number of bytes transferred so far. > > Test case for filesystems (with

Re: [PATCH v5] Return bytes transferred for partial direct I/O

2018-01-18 Thread Darrick J. Wong
On Fri, Jan 05, 2018 at 06:15:55AM -0600, Goldwyn Rodrigues wrote: > > > On 01/04/2018 08:10 PM, Darrick J. Wong wrote: > > On Wed, Nov 22, 2017 at 06:29:01AM -0600, Goldwyn Rodrigues wrote: > >> From: Goldwyn Rodrigues <rgold...@suse.com> > >> > >&g

Re: [PATCH v5 1/2] Return bytes transferred for partial direct I/O

2018-01-18 Thread Darrick J. Wong
roach to me - it's a > trivial change. I'm sure Darrick will shout if it's going to be a > problem, though. vfs.git is fine, though the second patch to remove the xfs assert should go first, as Al points out. For both patches, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > > Cheers, > > Dave. > -- > Dave Chinner > da...@fromorbit.com

Re: [PATCH v7 1/2] xfs: remove assert to check bytes returned

2018-02-08 Thread Darrick J. Wong
Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D

Re: [PATCH v7 2/2] Return bytes transferred for partial direct I/O

2018-03-07 Thread Darrick J. Wong
On Thu, Feb 08, 2018 at 12:59:48PM -0600, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > In case direct I/O encounters an error midway, it returns the error. > Instead it should be returning the number of bytes transferred so far. > > Test case for filesystems (with

Re: [PATCH v7 2/2] Return bytes transferred for partial direct I/O

2018-03-08 Thread Darrick J. Wong
On Thu, Mar 08, 2018 at 09:35:48AM -0600, Goldwyn Rodrigues wrote: > > > On 03/07/2018 06:53 PM, Darrick J. Wong wrote: > > On Thu, Feb 08, 2018 at 12:59:48PM -0600, Goldwyn Rodrigues wrote: > >> From: Goldwyn Rodrigues <rgold...@suse.com> > >> > >&g

Re: [RFC PATCH 00/79] Generic page write protection and a solution to page waitqueue

2018-04-18 Thread Darrick J. Wong
On Wed, Apr 18, 2018 at 11:54:30AM -0400, Jerome Glisse wrote: > On Wed, Apr 18, 2018 at 04:13:37PM +0200, Jan Kara wrote: > > Hello, > > > > so I finally got to this :) > > > > On Wed 04-04-18 15:17:50, jgli...@redhat.com wrote: > > > From: Jérôme Glisse > > [...] > > > >

Re: [PATCH] block: fix 32 bit overflow in __blkdev_issue_discard()

2018-11-13 Thread Darrick J. Wong
ot;) > Signed-off-by: Dave Chinner Fixes the regression for me too, so... Tested-by: Darrick J. Wong Reviewed-by: Darrick J. Wong --D > --- > block/blk-lib.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/block/blk-lib.c b/block/blk-lib.c > index e8