[GIT PULL] xfs: new features for 5.2

2019-05-07 Thread Darrick J. Wong
xfs: make tr_growdata a permanent transaction 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): x

[GIT PULL] xfs: new features for 5.3

2019-07-12 Thread Darrick J. Wong
er append boundaries xfs: 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 rou

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 straightfor

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: [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 tv_s

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

2019-07-31 Thread Darrick J. Wong
t super_block *sb, void > *data, int silent) > > sb->s_maxbytes = MAX_LFS_FILESIZE; > > + 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_MOUN

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 s

[GIT PULL] xfs: cleanups for 5.3-rc3

2019-08-03 Thread Darrick J. Wong
scrub code. -------- 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 fil

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

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 i

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

2019-07-30 Thread Darrick J. Wong
> > 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

[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 and

[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 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

[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 file

[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 t

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);

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 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 go

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 11/12] iomap: move the xfs writeback code to iomap.c

2019-06-24 Thread Darrick J. Wong
page*, 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

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 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 fi

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 09/12] xfs: refactor the ioend merging code

2019-06-24 Thread Darrick J. Wong
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 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 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 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(&ioend->io_list, &tmp); > >

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 t

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

[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: Chri

[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 w

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/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 file

[GIT PULL] xfs: fixes for 5.2-rc4

2019-06-06 Thread Darrick J. Wong
fsck code -------- 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(-)

Re: [PATCH] Documentation: xfs: Fix typo

2019-06-07 Thread Darrick J. Wong
lied. > > This patch probably should have 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

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 07/13] xfs: allow merging ioends over append boundaries

2019-06-27 Thread Darrick J. Wong
stead > 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. W

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

2019-06-27 Thread Darrick J. Wong
ck code. 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 +--- > f

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 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 > --- > fs/xfs/libx

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 E

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: [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 into a

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

[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..f08711b

[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

[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_

[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 file

[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 corr

[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 and

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 through

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

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 fun

[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 pri

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

2019-07-11 Thread Darrick J. Wong
allow 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

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(+)

[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: 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

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: 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 > 23

[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 th

[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

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

2019-02-21 Thread Darrick J. Wong
ed-off-by: 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 > --

[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 tmpfi

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: [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 > [-Werror,-Wsometimes

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

2019-03-07 Thread Darrick J. Wong
ce an always_cow mode Colin 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

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

2019-03-07 Thread Darrick J. Wong
ddr; > + highstale = 0; > + lowstale = 0; 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 c

Re: Leaking Path in XFS's ioctl interface(missing LSM check)

2018-10-01 Thread Darrick J. Wong
On Mon, Oct 01, 2018 at 04:04:42PM +0100, Alan Cox wrote: > > /* only root can play with this */ > > if (!capable(CAP_SYS_ADMIN)) > > return -EACCES; > > > > Think about it - if DM control ioctls only require CAP_SYS_ADMIN, > > then if have that cap you can use DM t

Re: [Patch] acpi_power_meter: remove 'ignoring unsafe software power cap' message

2018-09-07 Thread Darrick J. Wong
I doubt it's protecting much now. But /me shrugs and says, "eh, good enough". Also, nice to hear from you & lcm again. :) Reviewed-by: Darrick J. Wong --D > > Patch: Remove error message because it is generally misinterpreted. A > replacement > for the message is

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 Looks ok, I guess... Acked-by: Darrick J. Wong --D > --- > fs/xfs/xfs_aops.c | 2 +- > fs/xfs/xfs_aops.h | 2 +- > fs/xfs/xfs_super.c | 11 +-- > 3 files changed,

Re: [PATCH v7 12/14] xfs: prepare xfs_break_layouts() to be called with XFS_MMAPLOCK_EXCL

2018-03-30 Thread Darrick J. Wong
ll to > xfs_break_layouts(). > > Cc: "Darrick J. Wong" > Cc: Ross Zwisler > Cc: Dave Chinner > Suggested-by: Christoph Hellwig > Signed-off-by: Dan Williams Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_file.c |5 + > fs/xf

[GIT PULL] xfs: new features for 4.17

2018-04-02 Thread Darrick J. Wong
xfs: minor cleanup for xfs_reflink_end_cow xfs: refactor xfs_log_force_lsn xfs: unwind the try_again loop in xfs_log_force Darrick J. Wong (15): xfs: don't iunlock the quota ip when quota block xfs: convert a few more directory asserts to corruption xfs: check for cow bloc

Re: [PATCH] xfs: Correctly invert xfs_buftarg LRU isolation logic

2018-03-02 Thread Darrick J. Wong
On Thu, Mar 01, 2018 at 02:48:00PM -0800, Darrick J. Wong wrote: > On Wed, Feb 28, 2018 at 04:49:51PM +0100, Vratislav Bendel wrote: > > The function xfs_buftarg_isolate() used by xfs buffer schrinkers > > to determine whether a buffer should be isolated and disposed > &g

Re: [PATCH] xfs: Change URL for the project in xfs.txt

2018-03-02 Thread Darrick J. Wong
gt; for further details. This implementation is on-disk compatible > with the IRIX version of XFS. Looks ok, Reviewed-by: Darrick J. Wong --D > > -- > 2.16.2.345.g7e31236f652a > > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in &g

Re: [PATCH v5 02/12] dax: introduce IS_DEVDAX() and IS_FSDAX()

2018-03-02 Thread Darrick J. Wong
needs to be defined, non-zero, if either DAX facility is > enabled. > > Cc: "Theodore Ts'o" > Cc: Andreas Dilger > Cc: Alexander Viro > Cc: "Darrick J. Wong" > Cc: linux-...@vger.kernel.org > Cc: Matthew Wilcox > Cc: Ross Zwisler > Cc: > Fi

Re: [PATCH v5 08/12] xfs, dax: replace IS_DAX() with IS_FSDAX()

2018-03-02 Thread Darrick J. Wong
On Thu, Mar 01, 2018 at 07:54:16PM -0800, Dan Williams wrote: > In preparation for fixing the broken definition of S_DAX in the > CONFIG_FS_DAX=n + CONFIG_DEV_DAX=y case, convert all IS_DAX() usages to > use explicit tests for FSDAX since DAX is ambiguous. > > Cc: "Darrick J

Re: [PATCH v6] dax: introduce IS_DEVDAX() and IS_FSDAX()

2018-03-02 Thread Darrick J. Wong
needs to be defined, non-zero, if either DAX facility is > enabled. > > Cc: "Theodore Ts'o" > Cc: Andreas Dilger > Cc: Alexander Viro > Cc: "Darrick J. Wong" > Cc: linux-...@vger.kernel.org > Cc: Matthew Wilcox > Cc: Ross Zwisler > Cc: > Fi

Re: [RFC v2 06/83] Add inode get/read methods.

2018-04-22 Thread Darrick J. Wong
[haaa, I finally found time to read more of these] On Sat, Mar 10, 2018 at 10:17:47AM -0800, Andiry Xu wrote: > From: Andiry Xu > > These routines are incomplete and currently only support reserved inodes, > whose addresses are fixed. This is necessary for fill_super to work. > File/dir operatio

Re: [PATCH v6 12/15] xfs: require mmap lock for xfs_break_layouts()

2018-03-19 Thread Darrick J. Wong
dapted to take the appropriate mmap locks too -- definitely the exclusive mmap lock for the destination file because we anticipate punching out blocks. I'm not sure about the source file; I think taking the shared mmap lock is fine for that? --D > > Cc: "Darrick J. Wong" > Cc

Re: [PATCH v6 14/15] xfs: prepare xfs_break_layouts() for another layout type

2018-03-19 Thread Darrick J. Wong
ent map. While BREAK_WRITE breaks can be satisfied > be recalling FL_LAYOUT leases, BREAK_TRUNCATE breaks additionally > require waiting for busy dax-pages to go idle. > > Cc: "Darrick J. Wong" > Cc: Ross Zwisler > Reported-by: Dave Chinner > Reported-by: Chr

[GIT PULL] xfs: more fixes for 4.17-rc4

2018-05-04 Thread Darrick J. Wong
05-02 09:21:33 -0700) Changes since last update: - Cap the maximum length of a deduplication request at MAX_RW_COUNT/2 to avoid kernel livelock due to excessively large IO requests. -------- Darrick J. Wong (1): xf

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-08 Thread Darrick J. Wong
On Wed, May 09, 2018 at 12:03:28AM +, Luis R. Rodriguez wrote: > On Mon, May 07, 2018 at 05:30:55PM -0700, Darrick J. Wong wrote: > > On Tue, May 01, 2018 at 05:45:12PM +, Luis R. Rodriguez wrote: > > > On Tue, May 01, 2018 at 10:23:19AM -0700, Darrick J. Wong wrote: >

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-08 Thread Darrick J. Wong
On Wed, May 09, 2018 at 12:38:55AM +, Luis R. Rodriguez wrote: > On Tue, May 08, 2018 at 05:17:41PM -0700, Darrick J. Wong wrote: > > On Wed, May 09, 2018 at 12:03:28AM +, Luis R. Rodriguez wrote: > > > Groovy, thanks, let's not forget the xfs_repair respective fi

Re: vmalloc with GFP_NOFS

2018-05-09 Thread Darrick J. Wong
nd vmalloc should be called without > any problems. Sometimes if the context is not really clear or there are > layering violations then the recommended way around that is to wrap > ``vmalloc`` > by the scope API with a comment explaining the problem. Otherwise looks ok to me based on my understanding of how all this is supposed to work... Reviewed-by: Darrick J. Wong --D > -- > Michal Hocko > SUSE Labs

Re: vmalloc with GFP_NOFS

2018-05-09 Thread Darrick J. Wong
On Wed, May 09, 2018 at 11:04:47PM +0200, Michal Hocko wrote: > On Wed 09-05-18 08:13:51, Darrick J. Wong wrote: > > On Wed, May 09, 2018 at 03:42:22PM +0200, Michal Hocko wrote: > > > On Tue 24-04-18 13:25:42, Michal Hocko wrote: > > > [...] > > >

Re: [PATCH] ext4: make function ‘ext4_getfsmap_find_fixed_metadata’ static

2018-05-10 Thread Darrick J. Wong
_fixed_metadata’ [-Wmissing-prototypes] > > Signed-off-by: Mathieu Malaterre Sorry about being late to the party, Reviewed-by: Darrick J. Wong --D > --- > fs/ext4/fsmap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/ext4/fsmap.c b/

Re: [RFC v2 2/4] xfs: add verifier check for symlink with append/immutable flags

2018-05-10 Thread Darrick J. Wong
On Thu, May 10, 2018 at 04:13:57PM -0700, Luis R. Rodriguez wrote: > The Linux VFS does not allow a way to set append/immuttable attributes > to symlinks, this is just not possible. If this is detected we can > correct this with xfs_repair, so inform the user. > > Signed-off-by: Luis R. Rodriguez

Re: [RFC v2 03/83] Add super.h.

2018-03-14 Thread Darrick J. Wong
On Sat, Mar 10, 2018 at 10:17:44AM -0800, Andiry Xu wrote: > From: Andiry Xu > > This header file defines NOVA persistent and volatile superblock > data structures. > > It also defines NOVA block layout: > > Page 0: Superblock > Page 1: Reserved inodes > Page 2 - 15: Reserved > Page 16 - 31: In

Re: [RFC v2 04/83] NOVA inode definition.

2018-03-14 Thread Darrick J. Wong
On Sat, Mar 10, 2018 at 10:17:45AM -0800, Andiry Xu wrote: > From: Andiry Xu > > inode.h defines the non-volatile and volatile NOVA inode data structures. > > The non-volatile NOVA inode (nova_inode) is aligned to 128 bytes and contains > file/directory metadata information. The most important f

Re: [PATCH RFC] xfs, memcg: Call xfs_fs_nr_cached_objects() only in case of global reclaim

2018-03-15 Thread Darrick J. Wong
On Thu, Mar 15, 2018 at 06:01:34PM +0300, Kirill Tkhai wrote: > xfs_reclaim_inodes_count(XFS_M(sb)) does not care about memcg. > So, it's called for memcg reclaim too, e.g. this list is shrinked > disproportionality to another lists. > > This looks confusing, so I'm reporting about this. > Conside

Re: [RFC v2 03/83] Add super.h.

2018-03-15 Thread Darrick J. Wong
On Thu, Mar 15, 2018 at 11:17:54PM -0700, Andiry Xu wrote: > On Thu, Mar 15, 2018 at 7:59 PM, Theodore Y. Ts'o wrote: > > On Thu, Mar 15, 2018 at 09:38:29PM +0100, Arnd Bergmann wrote: > >> > >> You could also have a resolution of less than a nanosecond. Note > >> that today, the file time stamps

Re: [PATCH v2 21/35] ovl: add reflink/copyfile/dedup support

2018-05-07 Thread Darrick J. Wong
On Mon, May 07, 2018 at 10:37:53AM +0200, Miklos Szeredi wrote: > Since set of arguments are so similar, handle in a common helper. > > Signed-off-by: Miklos Szeredi > --- > fs/overlayfs/file.c | 88 > + > 1 file changed, 88 insertions(+) > >

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-07 Thread Darrick J. Wong
On Tue, May 01, 2018 at 05:45:12PM +, Luis R. Rodriguez wrote: > On Tue, May 01, 2018 at 10:23:19AM -0700, Darrick J. Wong wrote: > > On Thu, Apr 26, 2018 at 04:46:39PM -0700, Luis R. Rodriguez wrote: > > > Linux filesystems cannot set extra file attributes (stx_attributes as

Re: [PATCH v2 21/35] ovl: add reflink/copyfile/dedup support

2018-05-08 Thread Darrick J. Wong
On Tue, May 08, 2018 at 04:13:01PM +0200, Miklos Szeredi wrote: > On Mon, May 7, 2018 at 10:43 PM, Darrick J. Wong > wrote: > > On Mon, May 07, 2018 at 10:37:53AM +0200, Miklos Szeredi wrote: > >> Since set of arguments are so similar, handle in a common helper. > >&

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: [RFC PATCH] ext4: increase the protection of drop nlink and ext4 inode destroy

2017-01-04 Thread Darrick J. Wong
On Wed, Jan 04, 2017 at 04:29:33PM +0800, zhangyi (F) wrote: > On 2017/1/1 6:59, valdis.kletni...@vt.edu said: > > On Mon, 26 Dec 2016 20:34:17 +0800, yi zhang said: > >> Because of the disk and hardware issue, the ext4 filesystem have > >> many errors, the inode->i_nlink of ext4 becomes zero abnor

<    3   4   5   6   7   8   9   10   11   >