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

2019-06-28 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/attr.c | 16 fs/block_dev.c

[PATCH v6 0/4] vfs: make immutable files actually immutable

2019-06-28 Thread Darrick J. Wong
Hi all, The chattr(1) manpage has this to say about the immutable bit that system administrators can set on files: "A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file, most of the file's metadata can not be modified, and the

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

2019-06-28 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-06-28 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

[PATCH 5/5] vfs: only allow FSSETXATTR to set DAX flag on files and dirs

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong The DAX flag only applies to files and directories, so don't let it get set for other types of files. Signed-off-by: Darrick J. Wong --- fs/inode.c |8 1 file changed, 8 insertions(+) diff --git a/fs/inode.c b/fs/inode.c index 670d5408d022..f08711b34341

[PATCH 3/5] vfs: teach vfs_ioc_fssetxattr_check to check project id info

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong Standardize the project id checks for FSSETXATTR. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/ext4/ioctl.c| 27 --- fs/f2fs/file.c | 27 --- fs/inode.c | 13 + fs/xfs

Re: [PATCH 06/13] xfs: remove XFS_TRANS_NOFS

2019-06-28 Thread Darrick J. Wong
On Fri, Jun 28, 2019 at 07:37:17AM +0200, Christoph Hellwig wrote: > On Thu, Jun 27, 2019 at 03:30:30PM -0700, Darrick J. Wong wrote: > > I think the wording of this is too indirect. The reason we need to set > > NOFS is because we could be doing writeback as part of reclaiming &g

Re: [PATCH 07/13] xfs: allow merging ioends over append boundaries

2019-06-28 Thread Darrick J. Wong
On Fri, Jun 28, 2019 at 07:51:43AM +0200, Christoph Hellwig wrote: > On Thu, Jun 27, 2019 at 11:23:09AM -0700, Darrick J. Wong wrote: > > On Thu, Jun 27, 2019 at 12:48:30PM +0200, Christoph Hellwig wrote: > > > There is no real problem merging ioends that go beyond i_size i

Re: [PATCH 07/13] xfs: allow merging ioends over append boundaries

2019-06-27 Thread Darrick J. Wong
On Fri, Jun 28, 2019 at 10:52:04AM +0800, Zorro Lang wrote: > On Thu, Jun 27, 2019 at 09:43:04PM +, Luis Chamberlain wrote: > > On Thu, Jun 27, 2019 at 11:23:09AM -0700, Darrick J. Wong wrote: > > > On Thu, Jun 27, 2019 at 12:48:30PM +0200, Christoph Hellwig wrote: > &

Re: lift the xfs writepage code into iomap v2

2019-06-27 Thread Darrick J. Wong
On Thu, Jun 27, 2019 at 12:48:23PM +0200, Christoph Hellwig wrote: > Hi all, > > this series cleans up the xfs writepage code Ok. Patches #2 and #3 are trivial so I put them in my internal branch. By now I'm sure everyone's noticed that I suspect that patch #7 fixes the generic/475 crash that

Re: [PATCH 06/13] xfs: remove XFS_TRANS_NOFS

2019-06-27 Thread Darrick J. Wong
On Thu, Jun 27, 2019 at 12:48:29PM +0200, Christoph Hellwig wrote: > Instead of a magic flag for xfs_trans_alloc, just ensure all callers > that can't relclaim through the file system use memalloc_nofs_save to > set the per-task nofs flag. > > Signed-off-by: Christoph Hellwig > --- >

Re: [PATCH 01/13] list.h: add list_pop and list_pop_entry helpers

2019-06-27 Thread Darrick J. Wong
Christoph Hellwig LGTM, Reviewed-by: Darrick J. Wong --D > --- > include/linux/list.h | 33 + > 1 file changed, 33 insertions(+) > > diff --git a/include/linux/list.h b/include/linux/list.h > index e951228db4b2..ba6e27d2235a 100644 > ---

Re: [PATCH 04/13] xfs: initialize iomap->flags in xfs_bmbt_to_iomap

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

Re: [PATCH 07/13] xfs: allow merging ioends over append boundaries

2019-06-27 Thread Darrick J. Wong
e instead > of the magic 1 to cancel the transactions, and write a comment > explaining the scheme. > > Signed-off-by: Christoph Hellwig Reading through this patch, I have a feeling it fixes the crash that Zorro has been seeing occasionally with generic/475... Reviewed-by: Darrick J. Wong

Re: [PATCH 02/13] xfs: remove the unused xfs_count_page_state declaration

2019-06-27 Thread Darrick J. Wong
On Thu, Jun 27, 2019 at 12:48:25PM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_aops.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fs/xfs/xfs_aops.h b/fs/xfs/xfs_aops.h &g

Re: [PATCH -next] xfs: remove duplicated include

2019-06-27 Thread Darrick J. Wong
On Thu, Jun 27, 2019 at 03:33:23PM +0800, YueHaibing wrote: > Remove duplicated include. > > Signed-off-by: YueHaibing NAK, Eric Sandeen already sent this to the list. --D > --- > fs/xfs/xfs_extfree_item.c | 1 - > fs/xfs/xfs_filestream.c | 1 - > fs/xfs/xfs_pnfs.c | 1 - > 3 files

[PATCH 2/5] vfs: flush and wait for io when setting the immutable flag via SETFLAGS

2019-06-25 Thread Darrick J. Wong
From: Darrick J. Wong When we're using FS_IOC_SETFLAGS to set the immutable flag on a file, we need to ensure that userspace can't continue to write the file after the file becomes immutable. To make that happen, we have to flush all the dirty pagecache pages to disk to ensure that we can fail

[PATCH 1/5] vfs: create a generic checking and prep function for FS_IOC_SETFLAGS

2019-06-25 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic function to check incoming FS_IOC_SETFLAGS flag values and later prepare the inode for updates so that we can standardize the implementations that follow ext4's flag values. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara Reviewed-by: Christoph

Re: [PATCH 04/12] xfs: initialize ioma->flags in xfs_bmbt_to_iomap

2019-06-25 Thread Darrick J. Wong
On Tue, Jun 25, 2019 at 12:07:01PM +0200, Christoph Hellwig wrote: > On Mon, Jun 24, 2019 at 07:57:07AM -0700, Darrick J. Wong wrote: > > On Mon, Jun 24, 2019 at 07:52:45AM +0200, Christoph Hellwig wrote: > > > Currently we don't overwrite the flags field in the iomap in >

Re: [PATCH 12/12] iomap: add tracing for the address space operations

2019-06-25 Thread Darrick J. Wong
On Tue, Jun 25, 2019 at 12:15:15PM +0200, Christoph Hellwig wrote: > On Tue, Jun 25, 2019 at 09:49:21AM +1000, Dave Chinner wrote: > > > +#undef TRACE_SYSTEM > > > +#define TRACE_SYSTEM iomap > > > > Can you add a comment somewhere here that says these tracepoints are > > volatile and we reserve

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

2019-06-25 Thread Darrick J. Wong
On Tue, Jun 25, 2019 at 03:42:20PM +0300, Nikolay Borisov wrote: > > > On 25.06.19 г. 13:14 ч., Christoph Hellwig wrote: > > On Mon, Jun 24, 2019 at 07:06:22PM +0300, Nikolay Borisov wrote: > >>> +{ > >>> + struct list_headtmp; > >>> + > >>> + list_replace_init(>io_list, ); > >>> +

Re: [PATCH 07/12] xfs: don't preallocate a transaction for file size updates

2019-06-24 Thread Darrick J. Wong
On Mon, Jun 24, 2019 at 07:52:48AM +0200, Christoph Hellwig wrote: > We have historically decided that we want to preallocate the xfs_trans > structure at writeback time so that we don't have to allocate on in > the I/O completion handler. But we treat unwrittent extent and COW > fork conversions

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

2019-06-24 Thread Darrick J. Wong
On Mon, Jun 24, 2019 at 07:52:51AM +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 09/12] xfs: refactor the ioend merging code

2019-06-24 Thread Darrick J. Wong
ks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_aops.c | 66 ++- > 1 file changed, 36 insertions(+), 30 deletions(-) > > diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c > index acbd73976067..5d302ebe2a33 100644 > --

Re: [PATCH 08/12] xfs: simplify xfs_ioend_can_merge

2019-06-24 Thread Darrick J. Wong
On Mon, Jun 24, 2019 at 07:52:49AM +0200, Christoph Hellwig wrote: > Compare the block layer status directly instead of converting it to > an errno first. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_aops.c | 14 ++

Re: [PATCH 06/12] xfs: remove XFS_TRANS_NOFS

2019-06-24 Thread Darrick J. Wong
On Mon, Jun 24, 2019 at 07:52:47AM +0200, Christoph Hellwig wrote: > Instead of a magic flag for xfs_trans_alloc, just ensure all callers > that can't relclaim through the file system use memalloc_nofs_save to > set the per-task nofs flag. > > Signed-off-by: Christoph Hellwig Hmm this finally

Re: [PATCH 05/12] xfs: use a struct iomap in xfs_writepage_ctx

2019-06-24 Thread Darrick J. Wong
On Mon, Jun 24, 2019 at 07:52:46AM +0200, Christoph Hellwig wrote: > In preparation for moving the XFS writeback code to fs/iomap.c, switch > it to use struct iomap instead of the XFS-specific struct xfs_bmbt_irec. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Dar

Re: [PATCH 11/12] iomap: move the xfs writeback code to iomap.c

2019-06-24 Thread Darrick J. Wong
eadpage*, write, mkwrite) (~860 lines) * Zeroing (~80 lines) * FIEMAP and seek hole / seek data (~300 lines) * directio (~500 lines) * swapfiles (~170 lines) * and now, page cache writeback (~520 lines) If I have spare time this week (ha ha) I'll see if I can break all this

Re: [PATCH 02/12] xfs: simplify xfs_chain_bio

2019-06-24 Thread Darrick J. Wong
f-by: Christoph Hellwig I always thought it was a little odd that we were still setting bio fields in the submission function... Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_aops.c | 35 +-- > 1 file changed, 17 insertions(+), 18 deletions(-)

Re: [PATCH 04/12] xfs: initialize ioma->flags in xfs_bmbt_to_iomap

2019-06-24 Thread Darrick J. Wong
On Mon, Jun 24, 2019 at 07:52:45AM +0200, Christoph Hellwig wrote: > Currently we don't overwrite the flags field in the iomap in > xfs_bmbt_to_iomap. This works fine with 0-initialized iomaps on stack, > but is harmful once we want to be able to reuse an iomap in the > writeback code. Is that

Re: [PATCH 03/12] xfs: fix a comment typo in xfs_submit_ioend

2019-06-24 Thread Darrick J. Wong
On Mon, Jun 24, 2019 at 07:52:44AM +0200, Christoph Hellwig wrote: > The fail argument is long gone, update the comment. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_aops.c | 2 +- > 1 file changed, 1 insert

Re: [PATCH 01/12] list.h: add a list_pop helper

2019-06-24 Thread Darrick J. Wong
\ Unnecessary space after the ')' here, though I can fix that up if I merge this version of the series... Reviewed-by: Darrick J. Wong --D > +({ \ > + struct list_head *head__ = (list); \ >

[PATCH v4 0/7] vfs: make immutable files actually immutable

2019-06-21 Thread Darrick J. Wong
Hi all, The chattr(1) manpage has this to say about the immutable bit that system administrators can set on files: "A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file, most of the file's metadata can not be modified, and the

[PATCH 3/7] vfs: flush and wait for io when setting the immutable flag via FSSETXATTR

2019-06-21 Thread Darrick J. Wong
From: Darrick J. Wong When we're using FS_IOC_FSSETXATTR to set the immutable flag on a file, we need to ensure that userspace can't continue to write the file after the file becomes immutable. To make that happen, we have to flush all the dirty pagecache pages to disk to ensure that we can

[PATCH 1/7] mm/fs: don't allow writes to immutable files

2019-06-21 Thread Darrick J. Wong
From: Darrick J. Wong The chattr manpage has this to say about immutable files: "A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file, most of the file's metadata can not be modified, and the file can not be opened in write

[PATCH 2/4] vfs: create a generic checking function for FS_IOC_FSSETXATTR

2019-06-21 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic checking function for the incoming FS_IOC_FSSETXATTR fsxattr values so that we can standardize some of the implementation behaviors. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/btrfs/ioctl.c | 21 +--- fs/ext4/ioctl.c

[PATCH v2 0/4] vfs: clean up SETFLAGS and FSSETXATTR option processing

2019-06-21 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

[PATCH 2/4] vfs: create a generic checking function for FS_IOC_FSSETXATTR

2019-06-10 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic checking function for the incoming FS_IOC_FSSETXATTR fsxattr values so that we can standardize some of the implementation behaviors. Signed-off-by: Darrick J. Wong --- fs/btrfs/ioctl.c | 21 +--- fs/ext4/ioctl.c| 27

[PATCH v3 0/6] vfs: make immutable files actually immutable

2019-06-10 Thread Darrick J. Wong
Hi all, The chattr(1) manpage has this to say about the immutable bit that system administrators can set on files: "A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file, most of the file's metadata can not be modified, and the

Re: [PATCH] Documentation: xfs: Fix typo

2019-06-07 Thread Darrick J. Wong
ave been copied to the XFS list (added), even > though get_maintainer.pl doesn't know that. Yeah, it's "Y+p" not "Yp" in the xfs documentation repo: https://git.kernel.org/pub/scm/fs/xfs/xfs-documentation.git/tree/design/XFS_Filesystem_Structure/delayed_logging.asciidoc Rev

[GIT PULL] xfs: fixes for 5.2-rc4

2019-06-06 Thread Darrick J. Wong
Darrick J. Wong (2): xfs: fix broken log reservation debugging xfs: inode btree scrubber should calculate im_boffset correctly fs/xfs/scrub/ialloc.c | 3 ++- fs/xfs/xfs_log.c | 11 +-- 2 files changed, 11 insertions(+), 3 deletions(-)

[GIT PULL] xfs: fixes for 5.2

2019-05-23 Thread Darrick J. Wong
the reserve space for metadata expansion. Darrick J. Wong (1): xfs: don't reserve per-AG space for an internal log fs/xfs/libxfs/xfs_ialloc_btree.c | 9 + fs/xfs/libxfs/xfs_refcount_btree.c | 9 + fs/xfs

[GIT PULL] xfs: new features for 5.2

2019-05-07 Thread Darrick J. Wong
xfs: assert that we don't enter agfl freeing with a non-permanent transaction xfs: add missing error check in xfs_prepare_shift() Christoph Hellwig (1): xfs: don't parse the mtpt mount option Darrick J. Wong (27): xfs: track metadata health status xfs: replace

Re: [PATCH] new flag COPY_FILE_RANGE_FILESIZE for copy_file_range()

2019-04-13 Thread Darrick J. Wong
On Sat, Apr 13, 2019 at 03:54:39PM -0500, Shawn Landden wrote: /me pulls out his close-reading glasses and the copy_file_range manpage... > If flags includes COPY_FILE_RANGE_FILESIZE then the length > copied is the length of the file. off_in and off_out are > ignored. len must be 0 or the file

Re: [PATCH] xfs: use struct_size() helper

2019-04-12 Thread Darrick J. Wong
On Thu, Apr 11, 2019 at 08:57:14PM -0500, Gustavo A. R. Silva wrote: > > > On 4/11/19 7:19 PM, Darrick J. Wong wrote: > > [fixing linux-xfs cc] > > > > Thanks for this. > > > On Thu, Apr 11, 2019 at 06:37:58PM -0500, Gustavo A. R. Silva wrote: > >>

Re: [PATCH] xfs: use struct_size() helper

2019-04-11 Thread Darrick J. Wong
[fixing linux-xfs cc] On Thu, Apr 11, 2019 at 06:37:58PM -0500, Gustavo A. R. Silva wrote: > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes, in particular in the > context in which this code is being used. > > So, replace

Re: [PATCH] fat: issue flush after the writeback of FAT

2019-04-08 Thread Darrick J. Wong
On Tue, Apr 09, 2019 at 11:01:58AM +0800, Hou Tao wrote: > fsync() needs to make sure the data & meta-data of file are persistent > after the return of fsync(), even when a power-failure occurs later. > In the case of fat-fs, the FAT belongs to the meta-data of file, > so we need to issue a flush

Re: [PATCH] fs/open: Fix most outstanding security bugs

2019-04-01 Thread Darrick J. Wong
On Mon, Apr 01, 2019 at 11:01:13AM +0200, Johannes Thumshirn wrote: > Over the last 20 years, the Linux kernel has accumulated hundreds if not > thousands of security vulnerabilities. > > One common pattern in most of these security related reports is processes > called "syzkaller", "trinity" or

[GIT PULL] xfs: bug fixes for 5.1-rc3

2019-03-29 Thread Darrick J. Wong
. Brian Foster (2): xfs: don't trip over uninitialized buffer on extent read of corrupted inode xfs: serialize unaligned dio writes against all other dio writes Darrick J. Wong (4): xfs: dabtree scrub needs to range-check level xfs: fix btree scrub checking

Re: [PATCH] ext4: use BUG() instead of BUG_ON(1)

2019-03-25 Thread Darrick J. Wong
On Mon, Mar 25, 2019 at 02:00:25PM +0100, Arnd Bergmann wrote: > BUG_ON(1) leads to bogus warnings from clang when > CONFIG_PROFILE_ANNOTATED_BRANCHES is set: > > fs/ext4/inode.c:544:4: error: variable 'retval' is used uninitialized > whenever 'if' condition is false >

[GIT PULL] xfs: minor cleanups for 5.1-rc1

2019-03-15 Thread Darrick J. Wong
since last update: - Fix some clang/smatch/sparse warnings about uninitialized variables. - Clean up some typedef usage. Darrick J. Wong (3): xfs: clean up xfs_dir2_leafn_add xfs: zero initialize highstale and lowstale

[PATCH 2/2] xfs: clean up xfs_dir2_leaf_addname

2019-03-11 Thread Darrick J. Wong
From: Darrick J. Wong Remove typedefs and consolidate local variable initialization. Signed-off-by: Darrick J. Wong --- fs/xfs/libxfs/xfs_dir2_leaf.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/fs/xfs/libxfs/xfs_dir2_leaf.c b/fs

[PATCH 1/2] xfs: zero initialize highstale and lowstale in xfs_dir2_leaf_addname

2019-03-11 Thread Darrick J. Wong
From: Darrick J. Wong Smatch complains about the following: fs/xfs/libxfs/xfs_dir2_leaf.c:848 xfs_dir2_leaf_addname() error: uninitialized symbol 'lowstale'. fs/xfs/libxfs/xfs_dir2_leaf.c:849 xfs_dir2_leaf_addname() error: uninitialized symbol 'highstale'. I don't think there's any incorrect

Re: [PATCH] xfs: Use kmem_zalloc for bp->b_pages.

2019-03-09 Thread Darrick J. Wong
On Sat, Mar 09, 2019 at 11:36:36PM +0800, Sean Fu wrote: > Change the allocation of bp->b_pages to use kmem_zalloc instead of > kmem_alloc. > Remove unnecessary memset for bp->b_pages. > > This reduces text size by 42 bytes. > Before: >text data bss dec hex filename >

Re: [PATCH] xfs: clean up xfs_dir2_leafn_add

2019-03-08 Thread Darrick J. Wong
On Fri, Mar 08, 2019 at 10:42:59AM -0800, Nick Desaulniers wrote: > On Fri, Mar 8, 2019 at 10:38 AM Darrick J. Wong > wrote: > > > > On Fri, Mar 08, 2019 at 10:12:33AM -0800, Nick Desaulniers wrote: > > > On Fri, Mar 8, 2019 at 8:13 AM Darrick J. Wong > > >

Re: [PATCH] xfs: clean up xfs_dir2_leafn_add

2019-03-08 Thread Darrick J. Wong
On Fri, Mar 08, 2019 at 10:12:33AM -0800, Nick Desaulniers wrote: > On Fri, Mar 8, 2019 at 8:13 AM Darrick J. Wong > wrote: > > > > From: Darrick J. Wong > > > > Remove typedefs and consolidate local variable initialization. > > > > Signed-off-by: D

[PATCH] xfs: clean up xfs_dir2_leafn_add

2019-03-08 Thread Darrick J. Wong
From: Darrick J. Wong Remove typedefs and consolidate local variable initialization. Signed-off-by: Darrick J. Wong --- fs/xfs/libxfs/xfs_dir2_node.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/fs/xfs/libxfs/xfs_dir2_node.c b/fs/xfs/libxfs

Re: [PATCH] xfs: Zero initialize highstale and lowstale in xfs_dir2_leafn_add

2019-03-07 Thread Darrick J. Wong
I think it would be a good idea to clean all the typedef junk out of the function definition as well... but on its own this will at least shut up the smatch/clang warnings, so: Looks ok, Reviewed-by: Darrick J. Wong (I'll have this and the cleanup tested and ready tomorrow, probably...) Than

[GIT PULL] xfs: new features for v5.1

2019-03-07 Thread Darrick J. Wong
lin Ian King (1): xfs: fix uninitialized error variable Darrick J. Wong (33): xfs: never try to scrub more than 64 inodes per inobt record xfs: check the ir_startino alignment directly xfs: check inobt record alignment on big block filesystems xfs: hoist inode clus

Re: [RFC] xfs: fix reporting supported extra file attributes for statx()

2019-03-01 Thread Darrick J. Wong
On Tue, Oct 31, 2017 at 03:13:05PM -0700, Luis R. Rodriguez wrote: > statx(2) notes that any attribute that is not indicated as supported by > stx_attributes_mask has no usable value. Commit 5f955f26f3d42d ("xfs: report > crtime and attribute flags to statx") added support for informing userspace

Re: [PATCH] tmpfs: fix uninitialized return value in shmem_link

2019-02-25 Thread Darrick J. Wong
On Mon, Feb 25, 2019 at 04:07:12PM -0800, Linus Torvalds wrote: > On Mon, Feb 25, 2019 at 4:03 PM Qian Cai wrote: > > > > > > Of course, that's just gcc. I have no idea what llvm ends up doing. > > > > Clang 7.0: > > > > # clang -O2 -S -Wall /tmp/test.c > > /tmp/test.c:46:6: warning: variable

[PATCH] tmpfs: fix uninitialized return value in shmem_link

2019-02-21 Thread Darrick J. Wong
From: Darrick J. Wong When we made the shmem_reserve_inode call in shmem_link conditional, we forgot to update the declaration for ret so that it always has a known value. Dan Carpenter pointed out this deficiency in the original patch. Fixes: "tmpfs: fix link accounting when a tm

Re: [PATCH][xfs-next] xfs: fix uninitialized error variable

2019-02-21 Thread Darrick J. Wong
Colin Ian King Thank you for the cleanup! Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/scrub/ialloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/xfs/scrub/ialloc.c b/fs/xfs/scrub/ialloc.c > index 2c9dad2b61b1..700114f79a7d 100644 > --- a/fs/xfs

Re: tmpfs inode leakage when opening file with O_TMP_FILE

2019-02-18 Thread Darrick J. Wong
On Mon, Feb 18, 2019 at 08:23:20PM -0800, Hugh Dickins wrote: > On Fri, 15 Feb 2019, Hugh Dickins wrote: > > On Thu, 14 Feb 2019, Darrick J. Wong wrote: > > > > On Mon, 11 Feb 2019 15:18:11 +0100 Matej Kupljen > > > > wrote: > > > > > > >

Re: tmpfs inode leakage when opening file with O_TMP_FILE

2019-02-14 Thread Darrick J. Wong
[cc the shmem maintainer and the mm list] On Thu, Feb 14, 2019 at 03:44:02PM -0800, Andrew Morton wrote: > (cc linux-fsdevel) > > On Mon, 11 Feb 2019 15:18:11 +0100 Matej Kupljen > wrote: > > > Hi, > > > > it seems that when opening file on file system that is mounted on > > tmpfs with the

[GIT PULL] xfs: fixes for v5.0-rc6

2019-02-07 Thread Darrick J. Wong
Brian Foster (2): xfs: eof trim writeback mapping as soon as it is cached xfs: end sync buffer I/O properly on shutdown error Darrick J. Wong (1): xfs: set buffer ops when repair probes for btree type fs/xfs/scrub/repair.c | 11 --- fs

Re: [PATCH] xfs: allow disabling xfs tracepoints via Kconfig

2019-02-04 Thread Darrick J. Wong
On Mon, Feb 04, 2019 at 10:20:35PM +0100, Rasmus Villemoes wrote: > linux/tracepoints.h allows individual subsystems to disable their > tracepoints. Add such a knob for xfs. Disabling XFS_TRACEPOINTS > reduces the resident size of xfs.ko by about a third, or ~350 KiB. LOL. :) > $ size

[GIT PULL] iomap: more fixes for v5.0

2019-02-01 Thread Darrick J. Wong
Hi Linus, Here are a couple of iomap fixes to eliminate some memory corruption and hang problems that were reported. --D The following changes since commit 1c7fc5cbc33980acd13d668f1c8f0313d6ae9fd8: Linux 5.0-rc2 (2019-01-14 10:41:12 +1200) are available in the Git repository at:

Re: [PATCH -next] xfs: remove duplicated xfs_defer.h

2019-01-31 Thread Darrick J. Wong
On Thu, Jan 17, 2019 at 03:02:17PM +0800, YueHaibing wrote: > Remove duplicated include. > > Signed-off-by: YueHaibing Looks fine to me, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_trans_bmap.c | 1 - > fs/xfs/xfs_trans_extfree.c | 1 - > fs/xfs/xfs_trans_r

Re: [PATCH v4 3/3] fs: let filldir_t return bool instead of an error code

2019-01-31 Thread Darrick J. Wong
On Wed, Jan 23, 2019 at 04:07:59PM +0100, Jann Horn wrote: > On Mon, Jan 21, 2019 at 11:24 PM Dave Chinner wrote: > > On Mon, Jan 21, 2019 at 04:49:45PM +0100, Jann Horn wrote: > > > On Sun, Jan 20, 2019 at 11:41 PM Dave Chinner wrote: > > > > On Fri, Jan 18, 2019 at 05:14:40PM +0100, Jann Horn

Re: [PATCH v4 1/3] fs: hoist EFSCORRUPTED definition into uapi header

2019-01-21 Thread Darrick J. Wong
On Mon, Jan 21, 2019 at 04:54:54PM -0500, Theodore Y. Ts'o wrote: > On Fri, Jan 18, 2019 at 05:14:38PM +0100, Jann Horn wrote: > > Multiple filesystems can already return EFSCORRUPTED errors to userspace; > > however, so far, definitions of EFSCORRUPTED were in filesystem-private > > headers. > >

Re: [PATCH v3 5/5] xfs: disable map_sync for virtio pmem

2019-01-09 Thread Darrick J. Wong
On Wed, Jan 09, 2019 at 08:17:36PM +0530, Pankaj Gupta wrote: > Virtio pmem provides asynchronous host page cache flush > mechanism. we don't support 'MAP_SYNC' with virtio pmem > and xfs. > > Signed-off-by: Pankaj Gupta > --- > fs/xfs/xfs_file.c | 8 > 1 file changed, 8 insertions(+)

Re: [PATCH] xfs: correct statx's result_mask value

2019-01-07 Thread Darrick J. Wong
On Tue, Jan 08, 2019 at 12:58:43PM +0800, Su Yanjun wrote: > > > On 1/8/2019 2:04 AM, Eric Sandeen wrote: > > On 1/7/19 11:52 AM, Darrick J. Wong wrote: > > > On Mon, Jan 07, 2019 at 04:53:10AM -0500, Su Yanjun wrote: > > > > For statx sysca

Re: [PATCH] xfs: correct statx's result_mask value

2019-01-07 Thread Darrick J. Wong
On Mon, Jan 07, 2019 at 09:52:29AM -0800, Darrick J. Wong wrote: > On Mon, Jan 07, 2019 at 04:53:10AM -0500, Su Yanjun wrote: > > For statx syscall, xfs return the wrong result_mask. > > > > Signed-off-by: Su Yanjun > > --- > > fs/xfs/xfs_iops.c | 3 +++

Re: [PATCH] xfs: correct statx's result_mask value

2019-01-07 Thread Darrick J. Wong
On Mon, Jan 07, 2019 at 04:53:10AM -0500, Su Yanjun wrote: > For statx syscall, xfs return the wrong result_mask. > > Signed-off-by: Su Yanjun > --- > fs/xfs/xfs_iops.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c > index f48ffd7..3811457

[GIT PULL] xfs: more updates for v4.21

2019-01-03 Thread Darrick J. Wong
Hi Linus, Here are a couple more small bug fixes for 4.21-rc1. It has undergone the usual testing regimen and merges cleanly with 4.20 final. Let me know if you encounter any problems with the merge. --D The following changes since commit 65eed012d1f2d0f0bf0ffc036826d58147de77b8: xfs:

[GIT PULL] iomap: more updates for v4.21

2019-01-03 Thread Darrick J. Wong
for the filesystem iomap code (2018-12-21 08:43:05 -0800) Changes since last update: - Take responsibility for the iomap code. Darrick J. Wong (1): iomap: take

Re: [PATCH 00/20] drop useless LIST_HEAD

2018-12-28 Thread Darrick J. Wong
On Thu, Dec 27, 2018 at 04:40:55PM +0300, Dan Carpenter wrote: > On Tue, Dec 25, 2018 at 11:12:20PM +0100, Tom Psyborg wrote: > > there was discussion about this just some days ago. CC 4-5 lists is > > more than enough > > > > I don't know who you were discussing this with... > > You should CC

[GIT PULL] iomap: updates for v4.21

2018-12-23 Thread Darrick J. Wong
Hi Linus, Here's a fix for a memory overflow bug in the iomap code for 4.21-rc1. It has undergone the usual testing regimen and merges cleanly with 4.20 final. Let me know if you encounter any problems with the merge. --D The following changes since commit

[GIT PULL] xfs: updates for v4.21

2018-12-23 Thread Darrick J. Wong
ion issues, remove an unwanted space Darrick J. Wong (16): xfs: split up the xfs_reflink_end_cow work into smaller transactions xfs: idiotproof defer op type configuration xfs: streamline defer op type handling xfs: const-ify xfs_owner_info arguments xfs: rem

Re: [PATCH 08/20] xfs: xfs_buf: drop useless LIST_HEAD

2018-12-23 Thread Darrick J. Wong
- LIST_HEAD(x); > ... when != x > // > > Fixes: 26f1fe858f274 ("xfs: reduce lock hold times in buffer writeback") > Signed-off-by: Julia Lawall Looks ok; are you planning to push this whole series directly to Linus or do you want me to take the tw

Re: [PATCH 09/20] xfs: xfs_fsops: drop useless LIST_HEAD

2018-12-23 Thread Darrick J. Wong
ixes: 0410c3bb2b88 ("xfs: factor ag btree root block initialisation") > Signed-off-by: Julia Lawall Reviewed-by: Darrick J. Wong --D > > --- > Successfully 0-day tested on 151 configurations. > > fs/xfs/xfs_fsops.c |1 - > 1 file changed, 1 deletion(-) &

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-17 Thread Darrick J. Wong
On Mon, Dec 17, 2018 at 10:34:43AM -0800, Matthew Wilcox wrote: > On Mon, Dec 17, 2018 at 01:11:50PM -0500, Jerome Glisse wrote: > > On Mon, Dec 17, 2018 at 08:58:19AM +1100, Dave Chinner wrote: > > > Sure, that's a possibility, but that doesn't close off any race > > > conditions because there

Re: [PATCH v2 01/12] fs-verity: add a documentation file

2018-12-17 Thread Darrick J. Wong
On Thu, Dec 13, 2018 at 08:48:03PM -0800, Eric Biggers wrote: > Hi Christoph, > > On Thu, Dec 13, 2018 at 12:22:49PM -0800, Christoph Hellwig wrote: > > On Wed, Dec 12, 2018 at 12:26:10PM -0800, Eric Biggers wrote: > > > > As this apparently got merged despite no proper reviews from VFS > > > >

Re: [GIT PULL] xfs: fixes for v4.20-rc6

2018-12-12 Thread Darrick J. Wong
On Tue, Dec 11, 2018 at 05:58:18AM -0800, Christoph Hellwig wrote: > On Sat, Dec 08, 2018 at 11:24:48AM -0800, Linus Torvalds wrote: > > Honestly, I really wish you simply wouldn't send me "xfs" fixes that > > aren't really xfs-specific at all. > > > > All the splice patches (and honestly, I feel

Re: [GIT PULL] xfs: fixes for v4.20-rc6

2018-12-12 Thread Darrick J. Wong
On Sat, Dec 08, 2018 at 11:24:48AM -0800, Linus Torvalds wrote: > On Sat, Dec 8, 2018 at 8:36 AM Darrick J. Wong > wrote: > > > > Finally, the most important fix is to the pipe splicing code (aka the > > generic copy_file_range fallback) to avoid pointless short directio

Re: [RFC PATCH v1 0/7] Block/XFS: Support alternative mirror device retry

2018-12-09 Thread Darrick J. Wong
On Sat, Dec 08, 2018 at 10:49:44PM +0800, Bob Liu wrote: > On 11/28/18 3:45 PM, Christoph Hellwig wrote: > > On Wed, Nov 28, 2018 at 04:33:03PM +1100, Dave Chinner wrote: > >>- how does propagation through stacked layers work? > > > > The only way it works is by each layering driving it.

[GIT PULL] xfs: fixes for v4.20-rc6

2018-12-08 Thread Darrick J. Wong
update: - Fix broken project quota inode counts - Fix incorrect PAGE_MASK/PAGE_SIZE usage - Fix incorrect return value in btree verifier - Fix WARN_ON remap flags false positive - Fix splice read overflows Darrick J. Wong (4

[GIT PULL] xfs: fixes for v4.20-rc6

2018-12-08 Thread Darrick J. Wong
update: - Fix broken project quota inode counts - Fix incorrect PAGE_MASK/PAGE_SIZE usage - Fix incorrect return value in btree verifier - Fix WARN_ON remap flags false positive - Fix splice read overflows Darrick J. Wong (4

Re: [PATCH AUTOSEL 4.14 25/35] iomap: sub-block dio needs to zeroout beyond EOF

2018-11-30 Thread Darrick J. Wong
On Fri, Nov 30, 2018 at 05:14:41AM -0500, Sasha Levin wrote: > On Fri, Nov 30, 2018 at 09:22:03AM +0100, Greg KH wrote: > > On Fri, Nov 30, 2018 at 09:40:19AM +1100, Dave Chinner wrote: > > > I stopped my tests at 5 billion ops yesterday (i.e. 20 billion ops > > > aggregate) to focus on testing

Re: [PATCH AUTOSEL 4.14 25/35] iomap: sub-block dio needs to zeroout beyond EOF

2018-11-30 Thread Darrick J. Wong
On Fri, Nov 30, 2018 at 05:14:41AM -0500, Sasha Levin wrote: > On Fri, Nov 30, 2018 at 09:22:03AM +0100, Greg KH wrote: > > On Fri, Nov 30, 2018 at 09:40:19AM +1100, Dave Chinner wrote: > > > I stopped my tests at 5 billion ops yesterday (i.e. 20 billion ops > > > aggregate) to focus on testing

Re: [PATCH V2] xfs: libxfs: move xfs_perag_put late

2018-11-27 Thread Darrick J. Wong
> > > Signed-off-by: Pan Bian Looks ok, will amend the changelog on the way in. Reviewed-by: Darrick J. Wong --D > > --- > > V2: correct the commit log > > --- > > fs/xfs/libxfs/xfs_alloc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH V2] xfs: libxfs: move xfs_perag_put late

2018-11-27 Thread Darrick J. Wong
> > > Signed-off-by: Pan Bian Looks ok, will amend the changelog on the way in. Reviewed-by: Darrick J. Wong --D > > --- > > V2: correct the commit log > > --- > > fs/xfs/libxfs/xfs_alloc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH] xfs: clean up indentation issues, remove an unwanted space

2018-11-26 Thread Darrick J. Wong
On Fri, Nov 23, 2018 at 04:59:13PM +, Colin King wrote: > From: Colin Ian King > > There is a statement that has an unwanted space in the indentation. > Remove it. > > Signed-off-by: Colin Ian King Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_

Re: [PATCH] xfs: clean up indentation issues, remove an unwanted space

2018-11-26 Thread Darrick J. Wong
On Fri, Nov 23, 2018 at 04:59:13PM +, Colin King wrote: > From: Colin Ian King > > There is a statement that has an unwanted space in the indentation. > Remove it. > > Signed-off-by: Colin Ian King Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_

[GIT PULL] xfs: fixes for v4.20-rc4

2018-11-24 Thread Darrick J. Wong
Hi Linus, Dave and I have continued our work fixing corruption problems that can be found when running long-term burn-in exercisers on xfs. Here are some patches fixing most of the problems, but there will likely be more. :/ Anyhow, this series merges cleanly with master as of last night, so

[GIT PULL] xfs: fixes for v4.20-rc4

2018-11-24 Thread Darrick J. Wong
Hi Linus, Dave and I have continued our work fixing corruption problems that can be found when running long-term burn-in exercisers on xfs. Here are some patches fixing most of the problems, but there will likely be more. :/ Anyhow, this series merges cleanly with master as of last night, so

Re: [PATCH] fs/xfs: fix f_ffree value for statfs when project quota is set

2018-11-22 Thread Darrick J. Wong
this way? Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_qm_bhv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/xfs/xfs_qm_bhv.c b/fs/xfs/xfs_qm_bhv.c > index 73a1d77ec187..3091e4bc04ef 100644 > --- a/fs/xfs/xfs_qm_bhv.c > +++ b/fs/

Re: [PATCH] fs/xfs: fix f_ffree value for statfs when project quota is set

2018-11-22 Thread Darrick J. Wong
this way? Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_qm_bhv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/xfs/xfs_qm_bhv.c b/fs/xfs/xfs_qm_bhv.c > index 73a1d77ec187..3091e4bc04ef 100644 > --- a/fs/xfs/xfs_qm_bhv.c > +++ b/fs/

Re: [PATCH] xfs: Remove noinline from #define STATIC

2018-11-12 Thread Darrick J. Wong
On Mon, Nov 12, 2018 at 09:31:51PM -0800, Joe Perches wrote: > On Tue, 2018-11-13 at 16:26 +1100, Dave Chinner wrote: > > On Mon, Nov 12, 2018 at 08:23:42PM -0800, Joe Perches wrote: > > > On Tue, 2018-11-13 at 14:09 +1100, Dave Chinner wrote: > > > > On Mon, Nov 12, 2018 at 08:54:10PM -0500,

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