Re: [PATCH v2] xfs: Use the correct style for SPDX License Identifier

2020-05-12 Thread Darrick J. Wong
iles where C++ style should be used). > > Changes made by using a script provided by Joe Perches here: > https://lkml.org/lkml/2019/2/7/46. > > Suggested-by: Joe Perches > Signed-off-by: Nishad Kamdar Looks fine to me I guess, Reviewed-by: Darrick J. Wong --D > --- &g

Re: [PATCH] xfs: Replace zero-length array with flexible-array

2020-05-12 Thread Darrick J. Wong
ith the help of Coccinelle. > > [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > [2] https://github.com/KSPP/linux/issues/21 > [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") > > Signed-off-by: Gustavo A. R. Silva /me wonders what weird-arch kb

Re: [PATCH -next] xfs: remove duplicate headers

2020-05-08 Thread Darrick J. Wong
On Fri, May 08, 2020 at 08:27:24PM +0800, Chen Zhou wrote: > Remove duplicate headers which are included twice. > > Signed-off-by: Chen Zhou Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_xattr.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a

[ANNOUNCE] xfs-linux: vfs-for-next updated to 83d9088659e8

2020-05-04 Thread Darrick J. Wong
Hi folks, The vfs-for-next branch of the xfs-linux repository at: git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git has just been updated. After a very, very long process of discussing how sysadmins and app programmers are supposed to tag files for DAX data access mode, we have reached

[GIT PULL] iomap: bug fix for 5.7-rc3

2020-05-02 Thread Darrick J. Wong
Hi Linus, Please pull this single bug fix for 5.7 that hoists the check for an unrepresentable FIBMAP return value into ioctl_fibmap. The internal kernel function can handle 64-bit values (and is needed to fix a regression on ext4 + jbd2); it is only the userspace ioctl that is so old that it

Re: [PATCH V11 04/11] Documentation/dax: Update Usage section

2020-04-28 Thread Darrick J. Wong
On Tue, Apr 28, 2020 at 01:53:10PM -0700, Ira Weiny wrote: > On Tue, Apr 28, 2020 at 01:27:38PM -0700, Darrick J. Wong wrote: > > On Mon, Apr 27, 2020 at 05:21:35PM -0700, ira.we...@intel.com wrote: > > > From: Ira Weiny > > > > > [snip] > > > > + &

Re: [PATCH V11 04/11] Documentation/dax: Update Usage section

2020-04-28 Thread Darrick J. Wong
On Mon, Apr 27, 2020 at 05:21:35PM -0700, ira.we...@intel.com wrote: > From: Ira Weiny > > Update the Usage section to reflect the new individual dax selection > functionality. > > Signed-off-by: Ira Weiny > > --- > Changes from V10: > Clarifications from Dave > Add '-c' to xfs_io

Re: [PATCH V11 11/11] fs/xfs: Update xfs_ioctl_setattr_dax_invalidate()

2020-04-28 Thread Darrick J. Wong
ed. > > Change xfs_ioctl_setattr_dax_invalidate() to be > xfs_ioctl_dax_check_set_cache() and alter the code to reflect the new > functionality. > > Furthermore, we no longer need the locking so we remove the join_flags > logic. > > Signed-off-by: Ira Weiny Looks ok, Reviewed-by: Darrick

Re: [PATCH V11 10/11] fs: Introduce DCACHE_DONTCACHE

2020-04-28 Thread Darrick J. Wong
n that inode is being set I_DONTCACHE. > > This facilitates dropping dentry references to inodes sooner which > require eviction to swap S_DAX mode. > > Cc: Al Viro > Signed-off-by: Ira Weiny Seems reasonable to me, Reviewed-by: Darrick J. Wong --D > > --- > Chan

Re: [PATCH V11 06/11] fs/xfs: Make DAX mount option a tri-state

2020-04-28 Thread Darrick J. Wong
s://lore.kernel.org/lkml/20200405061945.ga94...@iweiny-desk2.sc.intel.com/ > > Signed-off-by: Ira Weiny Looks good to me, Reviewed-by: Darrick J. Wong --D > > --- > Changes from V10: > Move show options to xfs_info_set array > > Changes from V9: > Fix

Re: [PATCH V11 09/11] fs: Lift XFS_IDONTCACHE to the VFS layer

2020-04-28 Thread Darrick J. Wong
ara > Signed-off-by: Ira Weiny Looks ok to me, Reviewed-by: Darrick J. Wong --D > > --- > Changes from V9: > Fix misspelling in commit subject > move XFS_IEOFBLOCKS to '9' > > Changes from V8: > Remove XFS_IDONTCACHE > --- > fs/xfs/xfs_

Re: 回复: Re: [RFC PATCH 0/8] dax: Add a dax-rmap tree to support reflink

2020-04-28 Thread Darrick J. Wong
On Tue, Apr 28, 2020 at 09:24:41PM +1000, Dave Chinner wrote: > On Tue, Apr 28, 2020 at 04:16:36AM -0700, Matthew Wilcox wrote: > > On Tue, Apr 28, 2020 at 05:32:41PM +0800, Ruan Shiyang wrote: > > > On 2020/4/28 下午2:43, Dave Chinner wrote: > > > > On Tue, Apr 28, 2020 at 06:09:47AM +, Ruan,

Re: [PATCH] xfs: add mising include of xfs_pnfs.h for missing declarations

2019-10-22 Thread Darrick J. Wong
fs/xfs/xfs_pnfs.c:226:1: warning: symbol 'xfs_fs_commit_blocks' was not > declared. Should it be static? > > Signed-off-by: Ben Dooks (Codethink) Looks ok, Reviewed-by: Darrick J. Wong --D > --- > Cc: "Darrick J. Wong" > Cc: linux-...@vger.kernel.org > Cc: linux-k

Re: [PATCH 01/14] iomap: iomap that extends beyond EOF should be marked dirty

2019-10-17 Thread Darrick J. Wong
On Fri, Oct 18, 2019 at 10:08:14AM +1100, Matthew Bobrowski wrote: > On Fri, Oct 18, 2019 at 08:56:13AM +1100, Dave Chinner wrote: > > On Thu, Oct 17, 2019 at 11:39:17AM -0700, Darrick J. Wong wrote: > > > On Thu, Oct 17, 2019 at 07:56:11PM +0200, Christoph Hellwig wrote:

[GIT PULL] xfs: fixes for 5.4-rc4

2019-10-17 Thread Darrick J. Wong
. Darrick J. Wong (1): xfs: change the seconds fields in xfs_bulkstat to signed fs/xfs/libxfs/xfs_fs.h | 8 1 file changed, 4 insertions(+), 4 deletions(-)

Re: lift the xfs writepage code into iomap v8

2019-10-17 Thread Darrick J. Wong
On Thu, Oct 17, 2019 at 07:56:10PM +0200, Christoph Hellwig wrote: > Hi Darrick, > > this series cleans up the xfs writepage code and then lifts it to > fs/iomap/ so that it could be use by other file system. > > Note: the submit_ioend hook has not been renamed. Feel free to > rename it if you

Re: [PATCH 10/14] iomap: lift the xfs writeback code to iomap

2019-10-17 Thread Darrick J. Wong
io handler for complex > + * operations like copy on write extent manipulation or unwritten extent > + * conversions. > + */ > + int (*submit_ioend)(struct iomap_ioend *ioend, int status); > + Looks ok, but I reserve the right to rename this to ->prep

Re: [PATCH 14/14] iomap: pass a struct page to iomap_finish_page_writeback

2019-10-17 Thread Darrick J. Wong
On Thu, Oct 17, 2019 at 07:56:24PM +0200, Christoph Hellwig wrote: > No need to pass the full bio_vec. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/buffered-io.c | 10 +- > 1 file changed, 5 insertions(+), 5 dele

Re: [PATCH 01/14] iomap: iomap that extends beyond EOF should be marked dirty

2019-10-17 Thread Darrick J. Wong
y. > > Signed-off-by: Dave Chinner > Signed-off-by: Christoph Hellwig Looks ok, but need fixes tag. Also, might it be wise to split off the ext4 section into a separate patch so that it can be backported separately? Reviewed-by: Darrick J. Wong --D > --- > fs/e

Re: [PATCH 05/14] xfs: refactor the ioend merging code

2019-10-17 Thread Darrick J. Wong
Chinner Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_aops.c | 73 +++ > 1 file changed, 42 insertions(+), 31 deletions(-) > > diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c > index 91899de2be09..c29ef69d1

Re: [PATCH 09/12] iomap: lift the xfs writeback code to iomap

2019-10-15 Thread Darrick J. Wong
On Wed, Oct 16, 2019 at 09:07:21AM +1100, Dave Chinner wrote: > On Tue, Oct 15, 2019 at 05:43:42PM +0200, Christoph Hellwig wrote: > > Take the xfs writeback code and move it to fs/iomap. A new structure > > with three methods is added as the abstraction from the generic writeback > > code to the

Re: [PATCH 09/12] iomap: lift the xfs writeback code to iomap

2019-10-15 Thread Darrick J. Wong
On Tue, Oct 15, 2019 at 05:43:42PM +0200, Christoph Hellwig wrote: > Take the xfs writeback code and move it to fs/iomap. A new structure > with three methods is added as the abstraction from the generic writeback > code to the file system. These methods are used to map blocks, submit an >

Re: [PATCH 08/12] iomap: lift the xfs readpage / readpages tracing to iomap

2019-10-15 Thread Darrick J. Wong
On Tue, Oct 15, 2019 at 05:43:41PM +0200, Christoph Hellwig wrote: > Lift the xfs code for tracing address space operations to the iomap > layer. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/Makefile | 16

Re: [PATCH 06/12] xfs: remove the fork fields in the writepage_ctx and ioend

2019-10-15 Thread Darrick J. Wong
On Tue, Oct 15, 2019 at 05:43:39PM +0200, Christoph Hellwig wrote: > In preparation for moving the writeback code to iomap.c, replace the > XFS-specific COW fork concept with the iomap IOMAP_F_SHARED flag. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J

Re: [PATCH 05/12] xfs: turn io_append_trans into an io_private void pointer

2019-10-15 Thread Darrick J. Wong
lwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_aops.c | 26 +- > fs/xfs/xfs_aops.h | 2 +- > 2 files changed, 14 insertions(+), 14 deletions(-) > > diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c > index c29ef69d1e51..df5955388

Re: [PATCH 02/12] xfs: set IOMAP_F_NEW more carefully

2019-10-15 Thread Darrick J. Wong
cated blocks, which is required for > the iomap code to fully support file systems that don't do delayed > allocations or use unwritten extents. > > Signed-off-by: Christoph Hellwig Other than that, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_iomap.c | 9 ++---

Re: [PATCH 01/12] xfs: initialize iomap->flags in xfs_bmbt_to_iomap

2019-10-15 Thread Darrick J. Wong
de. Replace the shared paramter with a set of initial "parameter" Looks ok otherwise, Reviewed-by: Darrick J. Wong --D > flags an thus ensures the flags field is always reinitialized. > > Signed-off-by: Christoph Hellwig > --- > fs/xfs/xfs_iomap.c | 28 +

Re: [PATCH 12/12] iomap: cleanup iomap_ioend_compare

2019-10-15 Thread Darrick J. Wong
On Tue, Oct 15, 2019 at 05:43:45PM +0200, Christoph Hellwig wrote: > Move the initialization of ia and ib to the declaration line and remove > a superflous else. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/buffered-io.

Re: [PATCH 04/12] xfs: refactor the ioend merging code

2019-10-15 Thread Darrick J. Wong
On Tue, Oct 15, 2019 at 05:43:37PM +0200, Christoph Hellwig wrote: > Introduce two nicely abstracted helper, which can be moved to the > iomap code later. Also use list_pop_entry and list_first_entry_or_null > to simplify the code a bit. No we don't use these ^^ Everything

Re: INFO: task hung in pipe_write (2)

2019-10-14 Thread Darrick J. Wong
On Mon, Oct 14, 2019 at 10:40:44PM +0200, Andreas Gruenbacher wrote: > Hi Darrick, > > On Thu, Sep 19, 2019 at 11:10 PM Darrick J. Wong > wrote: > > On Thu, Sep 19, 2019 at 10:55:44PM +0200, Rasmus Villemoes wrote: > > > On 19/09/2019 19.19, syzbot wrote: > >

Re: [PATCH] xfs: include QUOTA, FATAL ASSERT build options in XFS_BUILD_OPTIONS

2019-10-14 Thread Darrick J. Wong
On Mon, Sep 16, 2019 at 09:24:06AM -0700, Darrick J. Wong wrote: > On Fri, Sep 06, 2019 at 02:26:46PM +0800, yu kuai wrote: > > In commit d03a2f1b9fa8 ("xfs: include WARN, REPAIR build options in > > XFS_BUILD_OPTIONS"), Eric pointed out that the XFS_BUILD_OPTIONS string,

[GIT PULL] xfs: fixes for 5.4-rc3

2019-10-10 Thread Darrick J. Wong
Hi Linus, Please pull this set of changes for 5.4-rc3. There are a couple of small code cleanups and bug fixes for rounding errors, metadata logging errors, and an extra layer of safeguards against leaking memory contents. The branch has survived a round of xfstests runs and merges cleanly with

Re: [RFC PATCH 0/7] xfs: add reflink & dedupe support for fsdax.

2019-10-09 Thread Darrick J. Wong
On Tue, Oct 08, 2019 at 11:31:44PM -0700, Christoph Hellwig wrote: > Btw, I just had a chat with Dan last week on this. And he pointed out > that while this series deals with the read/write path issues of > reflink on DAX it doesn't deal with the mmap side issue that > page->mapping and

Re: [PATCH 10/11] xfs: use the iomap writeback code

2019-10-07 Thread Darrick J. Wong
On Sun, Oct 06, 2019 at 05:46:07PM +0200, Christoph Hellwig wrote: > Use the new iomap writeback code that was copied from XFS to perform > writeback. > > Signed-off-by: Christoph Hellwig > [darrick: reduce this patch only to convert the xfs writeback code] > Signed-off-b

Re: [PATCH 01/11] iomap: add tracing for the readpage / readpages

2019-10-07 Thread Darrick J. Wong
On Mon, Oct 07, 2019 at 08:17:05AM +0200, Christoph Hellwig wrote: > On Mon, Oct 07, 2019 at 07:48:38AM +0200, Christoph Hellwig wrote: > > On Sun, Oct 06, 2019 at 03:43:24PM -0700, Darrick J. Wong wrote: > > > > +iomap-y+= trace.o \ > >

Re: [PATCH 01/11] iomap: add tracing for the readpage / readpages

2019-10-06 Thread Darrick J. Wong
On Sun, Oct 06, 2019 at 05:45:58PM +0200, Christoph Hellwig wrote: > Lift the xfs code for tracing address space operations to the iomap > layer. > > Signed-off-by: Christoph Hellwig > --- > fs/iomap/Makefile | 16 -- > fs/iomap/buffered-io.c | 5 + > fs/iomap/trace.h

Re: [PATCH 01/11] iomap: add tracing for the readpage / readpages

2019-10-04 Thread Darrick J. Wong
On Tue, Oct 01, 2019 at 09:11:42AM +0200, Christoph Hellwig wrote: > Lift the xfs code for tracing address space operations to the iomap > layer. > > Signed-off-by: Christoph Hellwig > --- > fs/iomap/buffered-io.c | 7 +++ > include/trace/events/iomap.h | 27

Re: [PATCH 06/11] xfs: remove the readpage / readpages tracing code

2019-10-02 Thread Darrick J. Wong
On Tue, Oct 01, 2019 at 09:11:47AM +0200, Christoph Hellwig wrote: > The actual iomap implementations now have equivalent trace points. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_aops.c | 2 -- > fs/xf

Re: [PATCH 01/11] iomap: add tracing for the readpage / readpages

2019-10-01 Thread Darrick J. Wong
On Tue, Oct 01, 2019 at 09:11:42AM +0200, Christoph Hellwig wrote: > Lift the xfs code for tracing address space operations to the iomap > layer. > > Signed-off-by: Christoph Hellwig > --- > fs/iomap/buffered-io.c | 7 +++ > include/trace/events/iomap.h | 27

Re: [PATCH] xfs: Fix tail rounding in xfs_alloc_file_space()

2019-09-30 Thread Darrick J. Wong
$(stat -fc '%S' test_file) > $ fallocate -o $((block_size / 2)) -l $block_size test_file > $ xfs_bmap test_file > test_file: > 0: [0..15]: 11024..11039 > > Signed-off-by: Max Reitz Looks ok, will test... Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_bmap_

[GIT PULL] xfs: fixes for 5.4-rc1

2019-09-26 Thread Darrick J. Wong
): xfs: avoid unused to_mp() function warning Brian Foster (1): xfs: convert inode to extent format after extent merge due to shift Darrick J. Wong (1): xfs: revert 1baa2800e62d ("xfs: remove the unused XFS_ALLOC_USERDATA flag") Eric Sandeen (1): xfs: log pro

Re: [PATCH] xfs: Fix tail rounding in xfs_alloc_file_space()

2019-09-26 Thread Darrick J. Wong
On Thu, Sep 26, 2019 at 04:22:38PM +0200, Max Reitz wrote: > To ensure that all blocks touched by the range [offset, offset + count) > are allocated, we need to calculate the block count from the difference > of the range end (rounded up) and the range start (rounded down). > > Before this patch,

Re: [PATCH xfstests v2] overlay: Enable character device to be the base fs partition

2019-09-24 Thread Darrick J. Wong
On Tue, Sep 24, 2019 at 08:05:50PM -0700, Darrick J. Wong wrote: > On Wed, Sep 25, 2019 at 09:54:08AM +0800, Zhihao Cheng wrote: > > There is a message in _supported_fs(): > > _notrun "not suitable for this filesystem type: $FSTYP" > > for when overlay usecas

Re: [PATCH xfstests v2] overlay: Enable character device to be the base fs partition

2019-09-24 Thread Darrick J. Wong
On Wed, Sep 25, 2019 at 09:54:08AM +0800, Zhihao Cheng wrote: > There is a message in _supported_fs(): > _notrun "not suitable for this filesystem type: $FSTYP" > for when overlay usecases are executed on a chararcter device based base You can do that? What does that even look like? --D >

[GIT PULL] iomap: (far less) new code for 5.4

2019-09-24 Thread Darrick J. Wong
Hi Linus, Please pull this series containing all the new iomap code for 5.4. After last week's failed pull request attempt, I scuttled everything in the branch except for the directio endio api changes, which were trivial. Everything else will simply have to wait for the next cycle. The branch

Re: INFO: task hung in pipe_write (2)

2019-09-19 Thread Darrick J. Wong
    gcc (GCC) 9.0.0 20181231 (experimental) > > syz repro:  https://syzkaller.appspot.com/x/repro.syz?x=1185576960 > > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=143580a160 > > > > The bug was bisected to: > > > > commit cfb8647

[GIT PULL] xfs: new code for 5.4

2019-09-17 Thread Darrick J. Wong
_db xfs: remove the unused XFS_ALLOC_USERDATA flag xfs: add a xfs_valid_startblock helper Darrick J. Wong (12): xfs: bmap scrub should only scrub records once xfs: fix maxicount division by zero error xfs: don't return _QUERY_ABORT from xfs_rmap_has_other_keys xfs:

[GIT PULL] vfs: prohibit writes to active swap devices

2019-09-17 Thread Darrick J. Wong
to active swap files and swap partitions. Darrick J. Wong (2): mm: set S_SWAPFILE on blockdev swap devices vfs: don't allow writes to swap files fs/block_dev.c | 3 +++ include/linux/fs.h | 11 +++ mm

Re: [PATCH] xfs: include QUOTA, FATAL ASSERT build options in XFS_BUILD_OPTIONS

2019-09-16 Thread Darrick J. Wong
On Fri, Sep 06, 2019 at 02:26:46PM +0800, yu kuai wrote: > In commit d03a2f1b9fa8 ("xfs: include WARN, REPAIR build options in > XFS_BUILD_OPTIONS"), Eric pointed out that the XFS_BUILD_OPTIONS string, > shown at module init time and in modinfo output, does not currently > include all available

Re: [PATCH] xfs: Use WARN_ON_ONCE for bailout mount-operation

2019-09-05 Thread Darrick J. Wong
off-by: Austin Kim Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_mount.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c > index 322da69..3ab2acf 100644 > --- a/fs/xfs/xfs_mount.c > +

Re: [PATCH v2] xfs: revise function comment for xfs_trans_ail_delete

2019-09-03 Thread Darrick J. Wong
On Sat, Aug 31, 2019 at 05:23:43PM +0800, yu kuai wrote: > Since xfs_trans_ail_delete_bulk no longer exists, revising the comment > for new function xfs_trans_ail_delete. > > Fix following warning: > make W=1 fs/xfs/xfs_trans_ail.o > fs/xfs/xfs_trans_ail.c:793: warning: Function parameter or

Re: [PATCH -next RESEND] tracing: fix iomap.h build warnings

2019-09-01 Thread Darrick J. Wong
> inside parameter list will not be visible outside of this definition or > declaration > > Signed-off-by: Randy Dunlap > Cc: Steven Rostedt > Cc: Christoph Hellwig > Cc: Darrick J. Wong > --- > Resend to correct maintainer(s). Looks ok, will add it to my tree. Thank

Re: [PATCH] xfs: add function name in xfs_trans_ail_delete function header comments

2019-08-30 Thread Darrick J. Wong
On Fri, Aug 30, 2019 at 06:59:49PM +0800, yu kuai wrote: > Fix following warning: > make W=1 fs/xfs/xfs_trans_ail.o > fs/xfs/xfs_trans_ail.c:793: warning: Function parameter or member > 'ailp' not described in 'xfs_trans_ail_delete' > fs/xfs/xfs_trans_ail.c:793: warning: Function parameter or

Re: [PATCH] xfs: Initialize label array properly

2019-08-29 Thread Darrick J. Wong
On Fri, Aug 30, 2019 at 02:37:07PM +0900, Austin Kim wrote: > In case kernel stack variable is not initialized properly, > there is a risk of kernel information disclosure. > > So, initialize 'char label[]' array with null characters. Got a testcase for this? At least a couple other filesystems

Re: [PATCH] xfs: Use WARN_ON_ONCE rather than BUG for bailout mount-operation

2019-08-29 Thread Darrick J. Wong
On Fri, Aug 30, 2019 at 09:30:22AM +0900, Austin Kim wrote: > If the CONFIG_BUG is enabled, BUG is executed and then system is crashed. > However, the bailout for mount is no longer proceeding. > > For this reason, using WARN_ON_ONCE rather than BUG can prevent this > situation. > >

Re: [PATCH v3 07/11] xfs: remove unlikely() from WARN_ON() condition

2019-08-29 Thread Darrick J. Wong
On Thu, Aug 29, 2019 at 07:50:21PM +0300, Denis Efremov wrote: > "unlikely(WARN_ON(x))" is excessive. WARN_ON() already uses unlikely() > internally. > > Signed-off-by: Denis Efremov > Cc: "Darrick J. Wong" > Cc: Joe Perches > Cc: Andrew Morton > C

Re: [PATCH] xfs: Use WARN_ON rather than BUG() for bailout mount-operation

2019-08-29 Thread Darrick J. Wong
radix_tree_insert(>m_perag_tree, index, > > > pag))){ > > > > Please make this a WARN_ON_ONCE so that we don't see a flodding of > > messages in case of this error. > > > Hello, Mr. Christoph > Thanks for good feedback. > If the kernel log is flooded with erro

Re: [PATCH] xfs: Use WARN_ON rather than BUG() for bailout mount-operation

2019-08-29 Thread Darrick J. Wong
On Thu, Aug 29, 2019 at 12:56:55AM -0700, Christoph Hellwig wrote: > On Wed, Aug 28, 2019 at 03:47:49PM +0900, Austin Kim wrote: > > If the CONFIG_BUG is enabled, BUG() is executed and then system is crashed. > > However, the bailout for mount is no longer proceeding. > > > > For this reason,

Re: [PATCH] xfs: Use WARN_ON rather than BUG() for bailout mount-operation

2019-08-28 Thread Darrick J. Wong
On Thu, Aug 29, 2019 at 06:30:43AM +0900, Austin Kim wrote: > Dear Mr. Darrick J. Wong > > Thanks for reviewing patch. BTW, I have a question for you. > > Do I have to update the patch again with 'a space before the brace'? > Or could I just wait for the patch to be impor

Re: [PATCH v2] MAINTAINERS: add entry for LICENSES and SPDX stuff

2019-08-28 Thread Darrick J. Wong
On Tue, Aug 27, 2019 at 09:53:10PM +0200, Greg Kroah-Hartman wrote: > Thomas and I seem to have become the "unofficial" maintainers for these > files and questions about SPDX things. So let's make it official. > > Reported-by: "Darrick J. Wong" > Cc: Thomas Gl

Re: [PATCH] xfs: Use WARN_ON rather than BUG() for bailout mount-operation

2019-08-28 Thread Darrick J. Wong
ize_perag( > goto out_hash_destroy; > > spin_lock(>m_perag_lock); > - if (radix_tree_insert(>m_perag_tree, index, pag)) { > - BUG(); > + if (WARN_ON(radix_tree_insert(>m_perag_tree, index, pag))){ Need a s

[GIT PULL] xfs: fix for 5.3-rc6

2019-08-24 Thread Darrick J. Wong
. Darrick J. Wong (1): xfs: fix missing ILOCK unlock when xfs_setattr_nonsize fails due to EDQUOT fs/xfs/xfs_iops.c | 1 + 1 file changed, 1 insertion(+)

[GIT PULL] xfs: fixes for 5.3-rc6

2019-08-23 Thread Darrick J. Wong
broken error detection when breaking layouts Christoph Hellwig (2): xfs: fall back to native ioctls for unhandled compat ones xfs: compat_ioctl: use compat_ptr() Darrick J. Wong (2): vfs: fix page locking deadlocks

Re: [PATCH] xfs: Use BUG_ON rather than BUG() to remove unreachable code

2019-08-22 Thread Darrick J. Wong
On Thu, Aug 22, 2019 at 03:23:20PM +0900, Austin Kim wrote: > Code after BUG is unreachable since system would be crashed > after the call to BUG is made. > So change BUG_ON instead of BUG() to remove unreachable code. > --- > fs/xfs/xfs_mount.c | 8 +--- > 1 file changed, 1 insertion(+), 7

Re: [PATCH] fs/xfs: Fix return code of xfs_break_leased_layouts()

2019-08-19 Thread Darrick J. Wong
layout() > changes. > > Signed-off-by: Ira Weiny Doh. Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_pnfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c > index 0c954cad7449..a339bd5fa260 10

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Darrick J. Wong
On Mon, Aug 19, 2019 at 04:14:11AM +0800, Gao Xiang wrote: > Hi all, > > On Mon, Aug 19, 2019 at 02:16:55AM +0800, Gao Xiang wrote: > > Hi Hch, > > > > On Sun, Aug 18, 2019 at 10:47:02AM -0700, Christoph Hellwig wrote: > > > On Sun, Aug 18, 2019 at 10:29:38AM -0700, Eric Biggers wrote: > > > >

[PATCH v2 RFC 3/2] fstests: check that we can't write to swap files

2019-08-16 Thread Darrick J. Wong
From: Darrick J. Wong While active, the media backing a swap file is leased to the kernel. Userspace has no business writing to it. Make sure we can't do this. Signed-off-by: Darrick J. Wong --- v2: add tests for writable fds after swapon --- src/swapon.c | 135

[PATCH v2 2/2] vfs: don't allow writes to swap files

2019-08-16 Thread Darrick J. Wong
From: Darrick J. Wong Don't let userspace write to an active swap file because the kernel effectively has a long term lease on the storage and things could get seriously corrupted if we let this happen. Signed-off-by: Darrick J. Wong --- v2: add missing inode_drain_writes --- fs/block_dev.c

Re: [PATCH 2/2] vfs: don't allow writes to swap files

2019-08-16 Thread Darrick J. Wong
On Thu, Aug 15, 2019 at 11:41:21PM -0700, Christoph Hellwig wrote: > The new checks look fine to me, but where does the inode_drain_writes() > function come from, I can't find that in my tree anywhere. Doh. Forgot to include that patch in the series. :( /* * Flush file data before changing

Re: [PATCH RFC 3/2] fstests: check that we can't write to swap files

2019-08-15 Thread Darrick J. Wong
On Thu, Aug 15, 2019 at 02:26:03PM -0700, Andrew Morton wrote: > On Thu, 15 Aug 2019 09:34:34 -0700 "Darrick J. Wong" > wrote: > > > While active, the media backing a swap file is leased to the kernel. > > Userspace has no business writing to it. Make sure we ca

Re: [GIT PULL] xfs: fixes for 5.3-rc5

2019-08-15 Thread Darrick J. Wong
On Thu, Aug 15, 2019 at 12:38:33PM -0700, Linus Torvalds wrote: > Pulled. Just a quick note: > > On Thu, Aug 15, 2019 at 10:13 AM Darrick J. Wong wrote: > > > > - Convert more directory corruption debugging asserts to actual > > EFSCORRUPTED returns

Re: [PATCH v5 01/18] xfs: compat_ioctl: use compat_ptr()

2019-08-15 Thread Darrick J. Wong
On Thu, Aug 15, 2019 at 09:20:32PM +0200, Arnd Bergmann wrote: > On Thu, Aug 15, 2019 at 4:04 PM Christoph Hellwig wrote: > > > > On Thu, Aug 15, 2019 at 10:15:12PM +1000, Dave Chinner wrote: > > > > http://git.infradead.org/users/hch/xfs.git/shortlog/refs/heads/xfs-ioctl-table > > > > > > Lots

[GIT PULL] xfs: fixes for 5.3-rc5

2019-08-15 Thread Darrick J. Wong
more directory corruption debugging asserts to actual EFSCORRUPTED returns instead of blowing up later on. - Don't fail writeback just because we ran out of memory allocating metadata log data. Darrick J. Wong (2): xfs

[PATCH RFC 3/2] fstests: check that we can't write to swap files

2019-08-15 Thread Darrick J. Wong
From: Darrick J. Wong While active, the media backing a swap file is leased to the kernel. Userspace has no business writing to it. Make sure we can't do this. Signed-off-by: Darrick J. Wong --- tests/generic/717 | 60 + tests/generic

[PATCH 2/2] vfs: don't allow writes to swap files

2019-08-15 Thread Darrick J. Wong
From: Darrick J. Wong Don't let userspace write to an active swap file because the kernel effectively has a long term lease on the storage and things could get seriously corrupted if we let this happen. Signed-off-by: Darrick J. Wong --- fs/block_dev.c |3 +++ mm/filemap.c |3

[PATCH v3 0/2] vfs: make active swap files unwritable

2019-08-15 Thread Darrick J. Wong
Hi all, I discovered that it's possible for userspace to write to active swap files and swap devices. While activated, the kernel effectively holds an irrevocable (except by swapoff) longterm lease on the storage associated with the swap device, so we need to shut down this vector for memory

[PATCH 1/2] mm: set S_SWAPFILE on blockdev swap devices

2019-08-15 Thread Darrick J. Wong
From: Darrick J. Wong Set S_SWAPFILE on block device inodes so that they have the same protections as a swap flie. Signed-off-by: Darrick J. Wong --- mm/swapfile.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/mm/swapfile.c b/mm

Re: [PATCH] MAINTAINERS: iomap: Remove fs/iomap.c record

2019-08-13 Thread Darrick J. Wong
On Tue, Aug 13, 2019 at 09:13:25AM +0300, Denis Efremov wrote: > Update MAINTAINERS to reflect that fs/iomap.c file > was splitted into separate files in fs/iomap/ > > Cc: Darrick J. Wong > Cc: Christoph Hellwig > Cc: linux-fsde...@vger.kernel.org > Fixes: cb7181ff4b1c (

Re: [GIT PULL] xfs: cleanups for 5.3-rc3

2019-08-03 Thread Darrick J. Wong
On Sat, Aug 03, 2019 at 10:46:38AM -0700, Linus Torvalds wrote: > On Sat, Aug 3, 2019 at 9:33 AM Darrick J. Wong wrote: > > > > Here are a couple more bug fixes that trickled in since -rc1. It's > > survived the usual xfstests runs and merges cleanly with this morning's &g

[GIT PULL] xfs: cleanups for 5.3-rc3

2019-08-03 Thread Darrick J. Wong
. Darrick J. Wong (1): xfs: fix stack contents leakage in the v1 inumber ioctls Jia-Ju Bai (1): xfs: Fix possible null-pointer dereferences in xchk_da_btree_block_check_sibling() fs/xfs/scrub/dabtree.c | 6 +- fs/xfs/xfs_itable.c| 3 +++ 2 files changed

Re: [PATCH 05/20] utimes: Clamp the timestamps before update

2019-07-31 Thread Darrick J. Wong
On Mon, Jul 29, 2019 at 06:49:09PM -0700, Deepa Dinamani wrote: > POSIX is ambiguous on the behavior of timestamps for > futimens, utimensat and utimes. Whether to return an > error or silently clamp a timestamp beyond the range > supported by the underlying filesystems is not clear. > > POSIX.1

Re: [PATCH 06/20] fs: Fill in max and min timestamps in superblock

2019-07-31 Thread Darrick J. Wong
t; + sb->s_time_gran = NSEC_PER_SEC; > + sb->s_time_min = S32_MIN; > + sb->s_time_max = S32_MAX; > + > switch (sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) { > case UFS_MOUNT_UFSTYPE_44BSD: > UFSD("ufstype=44bsd\n"); > @@ -861,6 +865,9 @@ static int ufs_fill_super(struct super_block *sb, void > *data, int silent) > uspi->s_fshift = 9; > uspi->s_sbsize = super_block_size = 1536; > uspi->s_sbbase = 0; > + sb->s_time_gran = 1; > + sb->s_time_min = S64_MIN; > + sb->s_time_max = S64_MAX; > flags |= UFS_TYPE_UFS2 | UFS_DE_44BSD | UFS_UID_44BSD | > UFS_ST_44BSD | UFS_CG_44BSD; > break; > > diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c > index a14d11d78bd8..1a0daf46bae8 100644 > --- a/fs/xfs/xfs_super.c > +++ b/fs/xfs/xfs_super.c > @@ -1685,6 +1685,8 @@ xfs_fs_fill_super( > sb->s_maxbytes = xfs_max_file_offset(sb->s_blocksize_bits); > sb->s_max_links = XFS_MAXLINK; > sb->s_time_gran = 1; > + sb->s_time_min = S32_MIN; > + sb->s_time_max = S32_MAX; For the XFS part, Reviewed-by: Darrick J. Wong --D > set_posix_acl_flag(sb); > > /* version 5 superblocks support inode version counters. */ > -- > 2.17.1 >

Re: [PATCH 09/20] ext4: Initialize timestamps limits

2019-07-31 Thread Darrick J. Wong
On Mon, Jul 29, 2019 at 06:49:13PM -0700, Deepa Dinamani wrote: > ext4 has different overflow limits for max filesystem > timestamps based on the extra bytes available. > > The timestamp limits are calculated according to the > encoding table in > a4dad1ae24f85i(ext4: Fix handling of extended

Re: [PATCH v2] fs: xfs: Fix possible null-pointer dereferences in xchk_da_btree_block_check_sibling()

2019-07-30 Thread Darrick J. Wong
ur. > > To fix these bugs, ds->state->altpath.blk[level].bp is checked before > being used. > > These bugs are found by a static analysis tool STCheck written by us. > > Signed-off-by: Jia-Ju Bai Looks ok, Reviewed-by: Darrick J. Wong --D > --- > v2: > * Adjus

Re: lift the xfs writepage code into iomap v3

2019-07-29 Thread Darrick J. Wong
On Mon, Jul 22, 2019 at 11:50:12AM +0200, Christoph Hellwig wrote: > Hi all, > > this series cleans up the xfs writepage code and then lifts it to > fs/iomap.c so that it could be use by other file system. I've been > wanting to this for a while so that I could eventually convert gfs2 > over to

Re: [PATCH] fs: xfs: Fix possible null-pointer dereferences in xchk_da_btree_block_check_sibling()

2019-07-29 Thread Darrick J. Wong
On Mon, Jul 29, 2019 at 03:25:04PM +0800, Jia-Ju Bai wrote: > > > On 2019/7/29 12:20, Darrick J. Wong wrote: > > On Mon, Jul 29, 2019 at 11:24:01AM +0800, Jia-Ju Bai wrote: > > > In xchk_da_btree_block_check_sibling(), there is an if statement on > > > li

Re: [PATCH] fs: xfs: Fix possible null-pointer dereferences in xchk_da_btree_block_check_sibling()

2019-07-28 Thread Darrick J. Wong
On Mon, Jul 29, 2019 at 11:24:01AM +0800, Jia-Ju Bai wrote: > In xchk_da_btree_block_check_sibling(), there is an if statement on > line 274 to check whether ds->state->altpath.blk[level].bp is NULL: > if (ds->state->altpath.blk[level].bp) > > When ds->state->altpath.blk[level].bp is NULL,

Re: lift the xfs writepage code into iomap v3

2019-07-28 Thread Darrick J. Wong
On Sat, Jul 27, 2019 at 03:33:14PM +0200, Andreas Gruenbacher wrote: > On Sat, 27 Jul 2019 at 01:38, Darrick J. Wong wrote: > > On Mon, Jul 23, 2019 at 11:50:12AM +0200, Christoph Hellwig wrote: > > > Hi all, > > > > > > this series cleans up the xfs writepag

Re: lift the xfs writepage code into iomap v3

2019-07-26 Thread Darrick J. Wong
On Mon, Jul 23, 2019 at 11:50:12AM +0200, Christoph Hellwig wrote: > Hi all, > > this series cleans up the xfs writepage code and then lifts it to > fs/iomap.c so that it could be use by other file system. I've been > wanting to this for a while so that I could eventually convert gfs2 > over to

Re: linux-next: Tree for Jul 18 (header build error)

2019-07-18 Thread Darrick J. Wong
On Fri, Jul 19, 2019 at 10:05:57AM +1000, Stephen Rothwell wrote: > Hi all, > > On Thu, 18 Jul 2019 10:00:22 -0700 Randy Dunlap wrote: > > > > on x86_64, when CONFIG_BLOCK is not set: > > > > CC include/linux/iomap.h.s > > In file included from :0:0: > > ./../include/linux/iomap.h: In

[GIT PULL] xfs: cleanups for 5.3

2019-07-18 Thread Darrick J. Wong
Hi Linus, We had a few more lateish cleanup patches come in for 5.3 -- a couple of syncups with the userspace libxfs code and a conversion of the XFS administrator's guide to ReST format. The branch does /not/ merge cleanly against this morning's HEAD due to a conflict in

Re: [PATCH] iomap: hide iomap_sector with CONFIG_BLOCK=n

2019-07-18 Thread Darrick J. Wong
On Thu, Jul 18, 2019 at 03:08:35PM +0200, Christoph Hellwig wrote: > On Thu, Jul 18, 2019 at 03:03:15PM +0200, Arnd Bergmann wrote: > > The inclusion comes from the recently added header check in commit > > c93a0368aaa2 ("kbuild: do not create wrappers for header-test-y"). > > > > This just tries

Re: linux-next: Tree for Jul 17

2019-07-17 Thread Darrick J. Wong
akefile:1442: bindeb-pkg] Error 2 > > Investigations revealed hardcoded stuff from the ... > > Merge remote-tracking branch 'iomap/iomap-for-next' > > $ git blame scripts/package/mkdebian | grep 'cd source' > 87bdff62e470c (Darrick J. Wong2019-06-27 17:30:15 -0700 14

Re: [GIT PULL] xfs: new features for 5.3

2019-07-12 Thread Darrick J. Wong
On Fri, Jul 12, 2019 at 05:27:15PM -0700, Linus Torvalds wrote: > On Fri, Jul 12, 2019 at 11:02 AM Darrick J. Wong wrote: > > > > The branch merges cleanly against this morning's HEAD and survived an > > overnight run of xfstests. The merge was completely straightforward,

[GIT PULL] xfs: new features for 5.3

2019-07-12 Thread Darrick J. Wong
: simplify xfs_ioend_can_merge xfs: remove XFS_TRANS_NOFS xfs: chain bios the right way around in xfs_rw_bdev Darrick J. Wong (37): xfs: separate inode geometry xfs: refactor inode geometry setup routines xfs: fix inode_cluster_size rounding mayhem xfs: finish

[GIT PULL] vfs: standardize parameter checking for SETFLAGS/FSSETXATTR ioctls

2019-07-11 Thread Darrick J. Wong
the DAX flag to be set on files and directories. Darrick J. Wong (5): vfs: create a generic checking and prep function for FS_IOC_SETFLAGS vfs: create a generic checking function for FS_IOC_FSSETXATTR vfs: teach

[GIT PULL] vfs: fix copy_file_range bad behavior

2019-07-09 Thread Darrick J. Wong
Hi Linus, Please pull this series to fix numerous parameter checking problems and inconsistent behaviors in the new(ish) copy_file_range system call. Now the system call will actually check its range parameters correctly; refuse to copy into files for which the caller does not have sufficient

Re: Adding some trees to linux-next?

2019-07-01 Thread Darrick J. Wong
On Tue, Jul 02, 2019 at 01:42:10AM +1000, Stephen Rothwell wrote: > Hi Darrick, > > On Mon, 1 Jul 2019 08:35:52 -0700 "Darrick J. Wong" > wrote: > > > > Could you add my iomap-for-next and vfs-for-next branches to linux-next, > > please? They can be f

Adding some trees to linux-next?

2019-07-01 Thread Darrick J. Wong
Hi Stephen, Could you add my iomap-for-next and vfs-for-next branches to linux-next, please? They can be found here: git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git#iomap-for-next git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git#vfs-for-next I've decided that trying to munge all that

[PATCH v4 0/5] vfs: clean up SETFLAGS and FSSETXATTR option processing

2019-06-28 Thread Darrick J. Wong
Hi all, The FS_IOC_SETFLAGS and FS_IOC_FSSETXATTR ioctls were promoted from ext4 and XFS, respectively, into the VFS. However, we didn't promote any of the parameter checking code from those filesystems, which lead to a mess where each filesystem open-codes whatever parameter checks they want

<    1   2   3   4   5   6   7   8   9   10   >