Re: [PATCH] xfs: set inode size after creating symlink

2021-01-22 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH] xfs: set inode size after creating symlink

2021-01-21 Thread Brian Foster
On Thu, Jan 21, 2021 at 09:19:12AM -0600, Jeffrey Mitchell wrote: > When XFS creates a new symlink, it writes its size to disk but not to the > VFS inode. This causes i_size_read() to return 0 for that symlink until > it is re-read from disk, for example when the system is rebooted. > > I found th

Re: [PATCH] xfs: set inode size after creating symlink

2021-01-21 Thread Jeffrey Mitchell
On Thu, Jan 21, 2021 at 10:41:37AM -0800, Darrick J. Wong wrote: > Do directories have the same problem? Yes, I just checked in a VM. While ecryptfs does call vfs_getattr(), it only uses the "blocks" value to supplement the data from an identical generic_fillattr() call to what ecryptfs_getattr_li

Re: [PATCH] xfs: set inode size after creating symlink

2021-01-21 Thread Darrick J. Wong
On Thu, Jan 21, 2021 at 09:19:12AM -0600, Jeffrey Mitchell wrote: > When XFS creates a new symlink, it writes its size to disk but not to the > VFS inode. This causes i_size_read() to return 0 for that symlink until > it is re-read from disk, for example when the system is rebooted. > > I found th

[PATCH] xfs: set inode size after creating symlink

2021-01-21 Thread Jeffrey Mitchell
When XFS creates a new symlink, it writes its size to disk but not to the VFS inode. This causes i_size_read() to return 0 for that symlink until it is re-read from disk, for example when the system is rebooted. I found this inconsistency while protecting directories with eCryptFS. The command "st