Re: Kernels v4.9+ cause short reads of block devices

2017-08-23 Thread Andreas Dilger
On Aug 23, 2017, at 2:13 PM, Linus Torvalds wrote: > > On Wed, Aug 23, 2017 at 12:53 PM, Doug Nazar wrote: >> >> It's compiling now, but I think it's already set to MAX_LFS_FILESIZE. >> >> [ 169.095127] ppos=80180006000, s_maxbytes=7ff, magic=0x62646576, >> type=bdev > > Oh, right y

Re: [PATCH] f2fs: add ioctl to expose current features

2017-07-21 Thread Andreas Dilger
> On Jul 21, 2017, at 2:11 PM, Jaegeuk Kim wrote: > > This patch adds an ioctl to provide feature information to user. > For exapmle, SQLite can use this ioctl to detect whether f2fs support atomic > write or not. Just for reference, ext4 exposes functionality that the kernel supports via a file

Re: [PATCH] ext4: inplace xattr block update fails to deduplicate blocks

2017-07-15 Thread Andreas Dilger
at > debugfs -R 'stat y' /dev/sdb | cat > > This patch defers the reinsertion to the cache so that we can locate > other blocks with the same contents. > > Signed-off-by: Tahsin Erdogan Reviewed-by: Andreas Dilger > --- > fs/ext4/xattr.c | 4 +--- > 1 file cha

Re: [PATCH] ext4: make xattr inode reads faster

2017-07-14 Thread Andreas Dilger
On Jul 12, 2017, at 1:29 AM, Tahsin Erdogan wrote: > > ext4_xattr_inode_read() currently reads each block sequentially while > waiting for io operation to complete before moving on to the next > block. This prevents request merging in block layer. > > Fix this by starting reads for all blocks th

Re: [PATCH 2/2] afs: Add metadata xattrs

2017-07-06 Thread Andreas Dilger
On Jul 6, 2017, at 10:14 AM, David Howells wrote: > > Christoph Hellwig wrote: > >> NAK. Don't overload xattrs with magic behavior just to avoid the need >> to do proper syscalls or ioctls. > > How? This has to work on non-files, files you can't open and mountpoints. > You can't do an ioctl(

Re: [PATCH] vmalloc: respect the GFP_NOIO and GFP_NOFS flags

2017-06-30 Thread Andreas Dilger
On Jun 29, 2017, at 8:25 PM, Mikulas Patocka wrote: > > The __vmalloc function has a parameter gfp_mask with the allocation flags, > however it doesn't fully respect the GFP_NOIO and GFP_NOFS flags. The > pages are allocated with the specified gfp flags, but the pagetables are > always allocated

Re: [PATCH v2] ext4: have ext4_xattr_set_handle() allocate journal credits

2017-06-29 Thread Andreas Dilger
On Jun 28, 2017, at 9:06 PM, Tahsin Erdogan wrote: > > Currently, callers of ext4_xattr_set_handle() are expected to allocate > journal credits for setting extended attributes. ext4_xattr_set_credits() > helps them figure out necessary credits. ext4_xattr_set_handle() > performs a sufficient cred

Re: [PATCH] fs: ext4: inode->i_generation not assigned 0.

2017-06-28 Thread Andreas Dilger
On Jun 28, 2017, at 4:06 PM, Kyungchan Koh wrote: > > In fs/ext4/super.c, the function ext4_nfs_get_inode takes as input > "generation" that can be used to specify the generation of the inode to > be returned. When 0 is given as input, then inodes of any generation can > be returned. Therefore, g

Re: [PATCH] ext4: fix __ext4_xattr_set_credits()

2017-06-28 Thread Andreas Dilger
g quota related additions to above ea_inode feature check. > > Fixes: 74c5bfa651af ("ext4: xattr inode deduplication") > > Signed-off-by: Tahsin Erdogan Reviewed-by: Andreas Dilger > --- > fs/ext4/xattr.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >

Re: [PATCH] ext4: fast symlink test should not rely on i_blocks

2017-06-28 Thread Andreas Dilger
st symlink. The solution used in this patch is to treat > i_size = 0 as a non-fast symlink case. A zero sized symlink is not legal > so the only time this can happen is the mentioned scenario. This is also > logically correct because a i_size = 0 symlink has no data stored in > i_dat

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-26 Thread Andreas Dilger
> On Jun 26, 2017, at 1:22 PM, Tahsin Erdogan wrote: > > On Thu, Jun 22, 2017 at 4:23 PM, Khazhismel Kumykov wrote: >> - /* read error, skip block & hope for the best */ >>EXT4_ERROR_INODE(dir, "reading directory lblock %lu", >>

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Andreas Dilger
On Jun 23, 2017, at 5:26 PM, Theodore Ts'o wrote: > > On Fri, Jun 23, 2017 at 03:33:46PM -0700, Khazhismel Kumykov wrote: >> >> Giving up early or checking future blocks both work, critical thing >> here is not returning NULL after seeing a read error. >> Previously to this the behavior was to c

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Andreas Dilger
On Jun 23, 2017, at 6:26 AM, Theodore Ts'o wrote: > > On Fri, Jun 23, 2017 at 12:33:02AM -0600, Andreas Dilger wrote: >> On Jun 22, 2017, at 22:43, Theodore Ts'o wrote: >>> >>>> On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote: >

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-22 Thread Andreas Dilger
On Jun 22, 2017, at 22:43, Theodore Ts'o wrote: > >> On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote: >> Previously, a read error would be ignored and we would eventually return >> NULL from ext4_find_entry, which signals "no such file or directory". We >> should be returning E

Re: [PATCH 09/32] ext4: extended attribute value size limit is enforced by vfs

2017-06-22 Thread Andreas Dilger
On Jun 22, 2017, at 12:02 PM, Darrick J. Wong wrote: > > On Wed, Jun 21, 2017 at 02:21:19PM -0700, Tahsin Erdogan wrote: >> EXT4_XATTR_MAX_LARGE_EA_SIZE definition in ext4 is currently unused. >> Besides, vfs enforces its own 64k limit which makes the 1MB limit in >> ext4 redundant. Remove it. >

Re: [PATCH v5 27/28] ext4: xattr inode deduplication

2017-06-21 Thread Andreas Dilger
> On Jun 21, 2017, at 3:34 PM, Tahsin Erdogan wrote: > >> Tashin, we are already using the "no_mbcache" option name, so would prefer >> to keep that working. It would be OK to accept both option names to mean >> the same thing, and only document the "nombcache" option. > > Updated patch to acc

Re: [PATCH v5 27/28] ext4: xattr inode deduplication

2017-06-21 Thread Andreas Dilger
On Jun 20, 2017, at 3:07 AM, Tahsin Erdogan wrote: > > Ext4 now supports xattr values that are up to 64k in size (vfs limit). > Large xattr values are stored in external inodes each one holding a > single value. Once written the data blocks of these inodes are immutable. > > The real world use c

Re: [PATCH 32/32] ext4: add nombcache mount option

2017-06-21 Thread Andreas Dilger
he. > > Suggested-by: Andreas Dilger > Signed-off-by: Tahsin Erdogan > --- > fs/ext4/ext4.h | 1 + > fs/ext4/super.c | 33 ++--- > fs/ext4/xattr.c | 55 --- > 3 files changed, 59 insertions(+),

Re: [PATCH v2 23/31] mbcache: make mbcache naming more generic

2017-06-21 Thread Andreas Dilger
On Jun 20, 2017, at 3:01 AM, Tahsin Erdogan wrote: > > Make names more generic so that mbcache usage is not limited to > block sharing. In a subsequent patch in the series > ("ext4: xattr inode deduplication"), we start using the mbcache code > for sharing xattr inodes. With that patch, old mb_ca

Re: [PATCH v2 23/31] mbcache: make mbcache naming more generic

2017-06-21 Thread Andreas Dilger
des. With that patch, old mb_cache_entry.e_block > field could be holding either a block number or an inode number. > > Signed-off-by: Tahsin Erdogan Reviewed-by: Andreas Dilger > --- > v2: updated commit title and description > > fs/ext2/xattr.c | 18 +++

Re: [PATCH v5 27/28] ext4: xattr inode deduplication

2017-06-21 Thread Andreas Dilger
On Jun 20, 2017, at 3:49 AM, Tahsin Erdogan wrote: > > Thanks Andreas for the feedback. Please see my responses below: > >> It would be preferable to allow a mount option like "no_mbcache" to disable >> the use of shared xattrs. In the Lustre case at least, there will never be >> shared large x

Re: [PATCH v2 26/28] ext4: cleanup transaction restarts during inode deletion

2017-06-14 Thread Andreas Dilger
On Jun 14, 2017, at 8:17 AM, Tahsin Erdogan wrote: > > During inode deletion, journal credits that will be needed are hard to > determine, that is why we have journal extend/restart calls in several > places. Whenever a transaction is restarted, filesystem must be in a > consistent state because

Re: [PATCH 07/28] ext4: call journal revoke when freeing ea_inode blocks

2017-06-05 Thread Andreas Dilger
On May 31, 2017, at 10:12 AM, Darrick J. Wong wrote: > > On Wed, May 31, 2017 at 01:14:56AM -0700, Tahsin Erdogan wrote: >> ea_inode contents are treated as metadata, that's why it is journaled >> during initial writes. Failing to call revoke during freeing could cause >> user data to be overwrit

Re: [RFC PATCH] ext4: don't trap kswapd and allocating tasks on ext4 inode IO

2017-05-15 Thread Andreas Dilger
On May 15, 2017, at 5:46 PM, Johannes Weiner wrote: > > We have observed across several workloads situations where kswapd and > direct reclaimers get stuck in the inode shrinker of the ext4 / mount, > causing allocation latencies across tasks in the system, while there > are dozens of gigabytes o

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread Andreas Dilger
On Apr 21, 2017, at 7:13 AM, Michael Kerrisk (man-pages) wrote: > > On 04/21/2017 03:01 PM, David Howells wrote: >> Michael Kerrisk (man-pages) wrote: > >> (3) There's no problem with asking for extra bits, even if the running >> kerneldoes not support them, because the kernel tells you in

Re: [git pull] vfs fixes

2017-04-11 Thread Andreas Dilger
On Apr 11, 2017, at 12:48 AM, Al Viro wrote: > On Mon, Apr 10, 2017 at 11:10:19PM -0700, Linus Torvalds wrote: > >> It looks odd because the lock part is >> >>if (flags & LOOKUP_RCU) >>rcu_read_lock(); >> >> ie it's locked conditionally, and the code in b

Re: [PATCH] ext4: Add statx support

2017-03-31 Thread Andreas Dilger
0030 ( > ---- --ai) > > Signed-off-by: David Howells Reviewed-by: Andreas Dilger One minor nit below, but the current patch is OK. > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > index 4247d8d25687..5d02b922afa3 10064

Re: [PATCH] ext4: Add statx support

2017-03-17 Thread Andreas Dilger
On Mar 16, 2017, at 11:47 PM, Eric Biggers wrote: > On Thu, Mar 16, 2017 at 11:35:33AM +, David Howells wrote: >> + >> +ext4_get_inode_flags(ei); >> +flags = ei->i_flags & EXT4_FL_USER_VISIBLE; >> +if (flags & EXT4_APPEND_FL) >> +stat->attributes |= STATX_ATTR_APPEND; >

Re: [PATCH] ext4: Add statx support

2017-03-16 Thread Andreas Dilger
0030 ( > ---- --ai) > > Signed-off-by: David Howells Reviewed-by: Andreas Dilger > --- > > fs/ext4/ext4.h|1 + > fs/ext4/file.c|2 +- > fs/ext4/inode.c | 36 +++

Re: [PATCH v2] statx: optimize copy of struct statx to userspace

2017-03-12 Thread Andreas Dilger
On Mar 11, 2017, at 11:01 PM, Eric Biggers wrote: > > On Sat, Mar 11, 2017 at 08:02:06PM -0800, Eric Biggers wrote: >> On Sun, Mar 12, 2017 at 02:29:27AM +, Al Viro wrote: >>> >>> Oh, I agree that multiple __put_user() are wrong; I also agree that bulk >>> copy is the right approach (when we

Re: [git pull] vfs.git statx

2017-03-03 Thread Andreas Dilger
On Mar 2, 2017, at 9:31 PM, Al Viro wrote: > > statx: Add a system call to make enhanced file info available (2017-03-02 > 20:51:15 -0500) Yay! It is pretty rare that a merge request actually makes me smile, but I'm happy that this patch finally made it in. Thanks David & Al for your perseve

Re: [LSF/MM TOPIC] do we really need PG_error at all?

2017-02-27 Thread Andreas Dilger
On Feb 27, 2017, at 8:07 AM, Jeff Layton wrote: > > On Mon, 2017-02-27 at 11:27 +1100, NeilBrown wrote: >> On Sun, Feb 26 2017, James Bottomley wrote: >> >>> On Mon, 2017-02-27 at 08:03 +1100, NeilBrown wrote: On Sun, Feb 26 2017, James Bottomley wrote: > [added linux-scsi and lin

Re: [PATCHv6 11/37] HACK: readahead: alloc huge pages, if allowed

2017-02-09 Thread Andreas Dilger
On Feb 9, 2017, at 4:34 PM, Matthew Wilcox wrote: > > On Thu, Jan 26, 2017 at 02:57:53PM +0300, Kirill A. Shutemov wrote: >> Most page cache allocation happens via readahead (sync or async), so if >> we want to have significant number of huge pages in page cache we need >> to find a ways to alloc

Re: [PATCH] fs: ext3/ext4: increase the protection of nlink dec and inode destroy

2017-02-06 Thread Andreas Dilger
On Feb 6, 2017, at 5:35 AM, yi zhang wrote: > > From: zhangyi > > Because of the disk and hardware issue, the ext3/4 filesystem have > many errors, the inode->i_nlink of ext3/4 becomes zero abnormally > but the dentry is still positive, it will cause memory corruption > after the following proc

Re: [PATCH 8/8] Revert "ext4: fix wrong gfp type under transaction"

2017-01-17 Thread Andreas Dilger
On Jan 17, 2017, at 8:59 AM, Theodore Ts'o wrote: > > On Tue, Jan 17, 2017 at 04:18:17PM +0100, Michal Hocko wrote: >> >> OK, so I've been staring into the code and AFAIU current->journal_info >> can contain my stored information. I could either hijack part of the >> word as the ref counting is

Re: [PATCH] ext4: move halfmd4 into hash.c directly

2017-01-06 Thread Andreas Dilger
t/random-pt4-kill-duplicate-halfmd4-in-ext3-htree.patch This _just_ predates Git history so there is no commit hash for it. A couple of trivial whitespace changes if patch is resubmitted, but it looks fine as-is. Reviewed-by: Andreas Dilger > Signed-off-by: Jason A. Donenfeld &g

Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4 inode destroy

2017-01-04 Thread Andreas Dilger
On Jan 4, 2017, at 2:54 PM, Darrick J. Wong wrote: > > 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

Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4 inode destroy

2016-12-26 Thread Andreas Dilger
On Dec 26, 2016, at 5:34 AM, yi zhang wrote: > > Because of the disk and hardware issue, the ext4 filesystem have > many errors, the inode->i_nlink of ext4 becomes zero abnormally > but the dentry is still positive, it will cause memory corruption > after the following process: > > 1) Due to the

Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers

2016-12-13 Thread Andreas Dilger
ction of kvmalloc(). Since this is changing the ext4 code, you can add my: Reviewed-by: Andreas Dilger Cheers, Andreas > On Thu 08-12-16 11:33:00, Michal Hocko wrote: >> From: Michal Hocko >> >> Using kmalloc with the vmalloc fallback for larger allocations is a >> common pa

Re: [PATCH 1/6] ext4: Move is_32bit_api() to generic code

2016-12-12 Thread Andreas Dilger
On Dec 1, 2016, at 3:02 PM, Richard Weinberger wrote: > > Since UBIFS will also use this function, move it to compat.h. > > Signed-off-by: Richard Weinberger Looks fine, could have minor improvement as mentioned below. Reviewed-by: Andreas Dilger > --- > fs/ext4/

Re: [PATCH v2] vfs: fix put_compat_statfs64() does not handle errors

2016-11-29 Thread Andreas Dilger
> sizeof(sb), &sb); > if (err) > return -1; > > printf("sizeof f_bsize = %d, f_bsize=%ld\n", sizeof(sb.f_bsize), > sb.f_bsize); > > return 0; > } > > $ gcc -m32 statfs64_test.c > $ ./a.out > sizeof f_bsize = 4, f_bsi

Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available [ver #3]

2016-11-23 Thread Andreas Dilger
t; This is also specified in NFSv4 as a recommended attribute and could > be exported by NFSD [Steve French]. > > (3) Lightweight stat: Ask for just those details of interest, and allow a > netfs (such as NFS) to approximate anything not of interest, possibly > wi

Re: [PATCH 4/4] statx: AFS: Return enhanced file attributes [ver #3]

2016-11-23 Thread Andreas Dilger
On Nov 22, 2016, at 5:56 PM, David Howells wrote: > > Return enhanced file attributes from the AFS filesystem. This includes the > following: > > (1) STATX_ATTR_AUTOMOUNT will be set on automount directories by virtue of > S_AUTOMOUNT being set on the inode. These are referrals to other >

Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available [ver #3]

2016-11-23 Thread Andreas Dilger
gt; (3) Lightweight stat: Ask for just those details of interest, and allow a >> netfs (such as NFS) to approximate anything not of interest, possibly >> without going to the server [Trond Myklebust, Ulrich Drepper, Andreas >> Dilger]. >> >> (4) Heavyw

Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available [ver #3]

2016-11-23 Thread Andreas Dilger
gt; (3) Lightweight stat: Ask for just those details of interest, and allow a >> netfs (such as NFS) to approximate anything not of interest, possibly >> without going to the server [Trond Myklebust, Ulrich Drepper, Andreas >> Dilger]. >> >> (4) Heavyw

Re: [PATCH 2/4] statx: Ext4: Return enhanced file attributes [ver #3]

2016-11-23 Thread Andreas Dilger
0030 ( > --ai----) > IO-blocksize: blksize=4096 > > Signed-off-by: David Howells Reviewed-by: Andreas Dilger > --- > > fs/ext4/ext4.h|2 ++ > fs/ext4/file.c|2 +- > fs/ext4/inode.c |

Re: JBD2: Spotted dirty metadata buffer....

2016-11-22 Thread Andreas Dilger
On Nov 22, 2016, at 6:56 AM, Wolfgang Walter wrote: > > Am Montag, 21. November 2016, 17:49:36 schrieben Sie: >> On Nov 21, 2016, at 8:28 AM, Wolfgang Walter wrote: >>> Hello, >>> >>> I'm testing EXT4 with an external journal (data=journal). When writing I >>> rather often get> >>> JBD2: Sp

Re: JBD2: Spotted dirty metadata buffer....

2016-11-21 Thread Andreas Dilger
On Nov 21, 2016, at 8:28 AM, Wolfgang Walter wrote: > > Hello, > > I'm testing EXT4 with an external journal (data=journal). When writing I > rather often get > > JBD2: Spotted dirty metadata buffer (dev = dm-22, blocknr = > 1008028301). There's a risk of filesystem corruption in case o

Re: [PATCH 2/4] statx: Ext4: Return enhanced file attributes [ver #2]

2016-11-18 Thread Andreas Dilger
030 ( > --ai) > IO-blocksize: blksize=4096 > > Signed-off-by: David Howells Reviewed-by: Andreas Dilger > --- > > fs/ext4/ext4.h|2 ++ > fs/ext4/file.c|2 +- > fs/ext4/ino

Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available

2016-11-18 Thread Andreas Dilger
On Nov 18, 2016, at 1:59 AM, David Howells wrote: > > Andreas Dilger wrote: > >>>> If neither AT_STATX_*_SYNC flag is set, the behaviour is the default for >>>> stat() on that filesystem. >>> >>> We also need to specify here what happe

Re: [PATCH 4/4] statx: AFS: Return enhanced file attributes

2016-11-18 Thread Andreas Dilger
On Nov 17, 2016, at 6:35 AM, David Howells wrote: > > Return enhanced file attributes from the AFS filesystem. This includes the > following: > > (1) The data version number as st_version, setting STATX_VERSION. > > (2) STATX_ATTR_AUTOMOUNT will be set on automount directories by virtue of >

Re: [PATCH 2/4] statx: Ext4: Return enhanced file attributes

2016-11-17 Thread Andreas Dilger
Change: 2016-02-11 17:11:11.987790114+ >Birth: 2016-02-11 17:08:29.031795451+ > Attributes: 0030 ( > --ai) > IO-blocksize: blksize=4096 > > Signed-off-by: David Howells

Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available

2016-11-17 Thread Andreas Dilger
On Nov 17, 2016, at 4:40 PM, Dave Chinner wrote: > > On Thu, Nov 17, 2016 at 01:35:03PM +, David Howells wrote: >> Add a system call to make extended file information available, including >> file creation, data version and some attribute flags where available >> through the underlying filesys

Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available

2016-11-17 Thread Andreas Dilger
t, and allow a >> netfs (such as NFS) to approximate anything not of interest, possibly >> without going to the server [Trond Myklebust, Ulrich Drepper, Andreas >> Dilger]. >> >> (4) Heavyweight stat: Force a netfs to go to the server, even if it thinks >&

Re: [RFC][PATCH 0/4] Enhanced file stat system call

2016-11-17 Thread Andreas Dilger
> On Nov 17, 2016, at 1:00 PM, J. Bruce Fields wrote: > > On Thu, Nov 17, 2016 at 04:45:45PM +, David Howells wrote: >> One Thousand Gnomes wrote: >> (2) Lightweight stat (AT_STATX_DONT_SYNC): Ask for just those details of interest, and allow a network fs to approximate anyth

Re: [PATCH] f2fs: support multiple devices

2016-11-09 Thread Andreas Dilger
On Nov 9, 2016, at 1:56 PM, Jaegeuk Kim wrote: > > This patch implements multiple devices support for f2fs. > Given multiple devices by mkfs.f2fs, f2fs shows them entirely as one big > volume under one f2fs instance. > > Internal block management is very simple, but we will modify block > alloca

Re: [PATCH] vfs: fix statfs64() does not handle errors

2016-11-07 Thread Andreas Dilger
On Nov 7, 2016, at 3:21 AM, Li Wang wrote: > > statfs64() does NOT return -1 and setting errno to EOVERFLOW when some > variables(like: f_bsize) overflowed in the returned struct. > > reproducer: > step1. mount hugetlbfs with two different pagesize on ppc64 arch. > > $ hugeadm --pool-pages-max

Re: [RFC 0/6] vfs: Add timestamp range check support

2016-11-03 Thread Andreas Dilger
> On Nov 3, 2016, at 2:43 PM, Theodore Ts'o wrote: > > On Thu, Nov 03, 2016 at 09:48:27AM +1100, Dave Chinner wrote: >> >> We're going to need regression tests for this to ensure that it >> works properly and that we don't inadvertantly break it in future. >> Can you write some xfstests that ex

Re: [PATCHv4 18/43] block: define BIO_MAX_PAGES to HPAGE_PMD_NR if huge page cache enabled

2016-10-25 Thread Andreas Dilger
On Oct 25, 2016, at 6:54 AM, Kirill A. Shutemov wrote: > > On Tue, Oct 25, 2016 at 12:21:22AM -0700, Christoph Hellwig wrote: >> On Tue, Oct 25, 2016 at 03:13:17AM +0300, Kirill A. Shutemov wrote: >>> We are going to do IO a huge page a time. So we need BIO_MAX_PAGES to be >>> at least HPAGE_PMD_

Re: [PATCH V2 linux-next] ext4: make online resizing conditional

2016-10-21 Thread Andreas Dilger
nd bs=1M count=50 > cat ddappend >> ddext4 > losetup -f ddext4 > mount /dev/loop0 /mnt > resize2fs /dev/loop0 > > With option disabled: > "Operation not supported While checking for on-line resizing support" > > Signed-off-by: Fabian Frederick Reviewed-by:

Re: [PATCH 1/1 linux-next] ext4: make online resizing conditional

2016-10-20 Thread Andreas Dilger
> { > diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c > index bf5ae8e..81d28d2 100644 > --- a/fs/ext4/ioctl.c > +++ b/fs/ext4/ioctl.c > @@ -18,6 +18,7 @@ > #include > #include "ext4_jbd2.h" > #include "ext4.h" > +#include "resize.h&q

Re: [PATCH] ext4: Add missing KERN_CONT to a few more debugging uses

2016-10-13 Thread Andreas Dilger
gle > call to printk(KERN_DEBUG instead of 3 separate printks > o Use the more common varargs macro style > > Signed-off-by: Joe Perches Looks fine. Reviewed-by: Andreas Dilger > --- > fs/ext4/block_validity.c | 4 ++-- > fs/ext4/mballoc.h| 17 +++

Re: [PATCH 1/1] jbd2: fix incorrect unlock on j_list_lock

2016-10-12 Thread Andreas Dilger
commit v3.14-rc2-30-g6e4862a "jbd2: minimize region locked by j_list_lock in journal_get_create_access" under heavy load and this patch has fixed the problem. It should also be considered for stable kernels after 3.14. [I've updated the above commit message slightly to give more detai

Re: Question on ext4 directory hashes in combination with file name encryption

2016-09-30 Thread Andreas Dilger
On Sep 30, 2016, at 8:09 AM, Richard Weinberger wrote: > > Hi, > > if I read the ext4 code correctly, you pass encrypted filenames to > ext4fs_dirhash(). > These filenames are not encoded and therefore binary gibberish. > Isn't this a problem for the ext4 hash functions? My fear is that these

Re: [PATCHv3 29/41] ext4: make ext4_mpage_readpages() hugepage-aware

2016-09-15 Thread Andreas Dilger
On Sep 15, 2016, at 5:55 AM, Kirill A. Shutemov wrote: > > This patch modifies ext4_mpage_readpages() to deal with huge pages. > > We read out 2M at once, so we have to alloc (HPAGE_PMD_NR * > blocks_per_page) sector_t for that. I'm not entirely happy with kmalloc > in this codepath, but don't

Re: [PATCH] blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion

2016-09-14 Thread Andreas Dilger
On Sep 14, 2016, at 1:27 PM, Eric Biggers wrote: > > An obsolete comment and extra parentheses were left over from when the > sb_bgl_lock() macro was replaced with the bgl_lock_ptr() function. > > Signed-off-by: Eric Biggers Reviewed-by: Andreas Dilger > -

Re: [PATCH] blockgroup_lock.h: simplify definition of NR_BG_LOCKS

2016-09-14 Thread Andreas Dilger
s. > > Signed-off-by: Eric Biggers Reviewed-by: Andreas Dilger > --- > include/linux/blockgroup_lock.h | 22 ++ > 1 file changed, 2 insertions(+), 20 deletions(-) > > diff --git a/include/linux/blockgroup_lock.h b/include/linux/blockgroup_lock.h > ind

Re: [PATCHv2, 00/41] ext4: support of huge pages

2016-08-14 Thread Andreas Dilger
On Aug 12, 2016, at 12:37 PM, Kirill A. Shutemov wrote: > > Here's stabilized version of my patchset which intended to bring huge pages > to ext4. > > The basics are the same as with tmpfs[1] which is in Linus' tree now and > ext4 built on top of it. The main difference is that we need to handl

Re: [PATCH] compat: remove compat_printk

2016-06-22 Thread Andreas Dilger
> On Jun 22, 2016, at 4:15 AM, Arnd Bergmann wrote: > > On Tuesday, June 21, 2016 4:38:57 PM CEST Andrew Morton wrote: >>> @@ -1077,15 +1076,6 @@ static struct ctl_table kern_table[] = { >>> .extra1 = &neg_one, >>> }, >>> #endif >>> -#ifdef CONFIG_COMPAT >>> - { >>>

Re: [lustre-devel] [PATCH 11/21] drivers: staging: lustre: Replace CURRENT_TIME with current_fs_time()

2016-06-10 Thread Andreas Dilger
On Jun 10, 2016, at 6:36 PM, James Simmons wrote: > > >> CURRENT_TIME macro is not appropriate for filesystems as it >> doesn't use the right granularity for filesystem timestamps. >> Use current_fs_time() instead. >> >> This is also in preparation for the patch that transitions >> vfs timestam

Re: [PATCH] ext4: mballoc.c: fix ac_g_ex and ac_f_ex misuse bug in EXT4_MB_HINT_TRY_GOAL path

2016-06-07 Thread Andreas Dilger
e any kind of test case that shows the effect of the change (e.g. fragmentation counts per file before/after)? Reviewed-by: Andreas Dilger > Signed-off-by: Lin Feng > --- > fs/ext4/mballoc.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/fs/ext4/mball

Re: [BUG] Possible silent data corruption in filesystems/page cache

2016-06-02 Thread Andreas Dilger
On Jun 1, 2016, at 3:51 AM, Barczak, Mariusz wrote: > > We run data validation test for buffered workload on filesystems: > ext3, ext4, and XFS. > In context of flushing page cache block device driver returned IO error. > After dropping page cache our validation tool reported data corruption. Hi

Re: [PATCH 5/6] statx: Make windows attributes available for CIFS, NTFS and FAT to use

2016-05-02 Thread Andreas Dilger
On Apr 29, 2016, at 6:58 AM, David Howells wrote: > > Make windows attributes available for CIFS, NTFS and FAT to use in the > statx struct. The attribute flags map directly by value to those in the > CIFS PDU flags. Some of these bits can also be used by JFS, UFS and HPFS. > > The statx struc

Re: [PATCH 4/6] statx: NFS: Return enhanced file attributes

2016-05-02 Thread Andreas Dilger
On Apr 29, 2016, at 6:58 AM, David Howells wrote: > > Return enhanced file atrributes from the NFS filesystem. This includes the > following: > > (1) The change attribute as st_version if NFSv4. > > (2) STATX_INFO_AUTOMOUNT and STATX_INFO_FABRICATED are set on referral or > submount direct

Re: [PATCH 3/6] statx: Ext4: Return enhanced file attributes

2016-05-02 Thread Andreas Dilger
On Apr 29, 2016, at 6:57 AM, David Howells wrote: > > Return enhanced file attributes from the Ext4 filesystem. This includes > the following: > > (1) The inode creation time (i_crtime) as i_btime, setting STATX_BTIME. > > (2) The inode i_version as st_version if a file with I_VERSION set or a

Re: [PATCH 1/6] statx: Add a system call to make enhanced file info available

2016-05-02 Thread Andreas Dilger
; netfs (such as NFS) to approximate anything not of interest, possibly > without going to the server [Trond Myklebust, Ulrich Drepper, Andreas > Dilger]. > > (4) Heavyweight stat: Force a netfs to go to the server, even if it thinks > its cached attributes are up to da

Re: [PATCH 1.1/2] xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS

2016-04-27 Thread Andreas Dilger
On Apr 27, 2016, at 5:54 AM, Michal Hocko wrote: > > From: Michal Hocko > > xfs has defined PF_FSTRANS to declare a scope GFP_NOFS semantic quite > some time ago. We would like to make this concept more generic and use > it for other filesystems as well. Let's start by giving the flag a > more

Re: [PATCHSET][RFC][CFT] parallel lookups

2016-04-15 Thread Andreas Dilger
On Apr 15, 2016, at 6:52 PM, Al Viro wrote: > > The thing appears to be working. It's in vfs.git#work.lookups; the > last 5 commits are the infrastructure (fs/namei.c and fs/dcache.c; no changes > in fs/*/*) + actual switch to rwsem. > > The missing bits: down_write_killable() (ther

Re: [PATCH 15/15] parallel lookups: actual switch to rwsem

2016-04-15 Thread Andreas Dilger
On Apr 15, 2016, at 6:55 PM, Al Viro wrote: > > From: Al Viro > > ta-da! > > The main issue is the lack of down_write_killable(), so the places > like readdir.c switched to plain inode_lock(); once killable > variants of rwsem primitives appear, that'll be dealt with. > > lockdep side also mi

Re: [PATCH 2/2] block: create ioctl to discard-or-zeroout a range of blocks

2016-03-19 Thread Andreas Dilger
On Mar 15, 2016, at 7:51 PM, Darrick J. Wong wrote: > > On Tue, Mar 15, 2016 at 06:52:24PM -0400, Theodore Ts'o wrote: >> On Wed, Mar 16, 2016 at 09:33:13AM +1100, Dave Chinner wrote: >>> >>> Stale data escaping containment is a security issue. Enabling >>> generic kernel mechanisms to *enable c

Re: [PATCH 2/2] block: create ioctl to discard-or-zeroout a range of blocks

2016-03-19 Thread Andreas Dilger
On Mar 17, 2016, at 12:35 PM, Chris Mason wrote: > > On Thu, Mar 17, 2016 at 10:47:29AM -0700, Linus Torvalds wrote: >> On Wed, Mar 16, 2016 at 10:18 PM, Gregory Farnum wrote: >>> >>> So we've not asked for NO_HIDE_STALE on the mailing lists, but I think >>> it was one of the problems Sage had

Re: Latent undefined behaviour in fs/ext4/mballoc.c (seen in v4.5-rc3)

2016-02-08 Thread Andreas Dilger
On Feb 8, 2016, at 7:45 AM, Mark Rutland wrote: > > Hi, > > While trying UBSAN on arm64, I hit a couple of splats at boot in the > ext4 mballoc code [1] (duplicated below), on v4.5-rc3. In both cases a > dynamically-computed shift amount underflows before it is applied, > leading to a too-large

Re: [PATCH] ext4: add a line break for proc mb_groups display

2016-02-03 Thread Andreas Dilger
> On Feb 3, 2016, at 6:19 AM, Huaitong Han wrote: > > This patch adds a line break for proc mb_groups display. > > Signed-off-by: Huaitong Han Reviewed-by: Andreas Dilger > --- > fs/ext4/mballoc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > di

Re: [PATCH] ext4: add a line break for proc mb_groups display

2016-02-03 Thread Andreas Dilger
On Feb 3, 2016, at 1:07 PM, Darrick J. Wong wrote: > > On Wed, Feb 03, 2016 at 11:38:33AM -0800, Joe Perches wrote: >> On Wed, 2016-02-03 at 11:32 -0800, Darrick J. Wong wrote: >>> On Wed, Feb 03, 2016 at 10:30:32AM -0800, Joe Perches wrote: On Wed, 2016-02-03 at 10:13 -0800, Darrick J. Wong

Re: [PATCH 14/19] fs: Permit FIBMAP for users with CAP_SYS_RAWIO in s_user_ns

2015-12-04 Thread Andreas Dilger
> On Dec 4, 2015, at 4:11 PM, Theodore Ts'o wrote: > > On Fri, Dec 04, 2015 at 02:45:32PM -0600, Seth Forshee wrote: >> On Fri, Dec 04, 2015 at 02:07:36PM -0600, Serge E. Hallyn wrote: >>> Heh, I was looking over >>> http://www.gossamer-threads.com/lists/linux/kernel/103611 >>> a little while a

Re: [PATCH 02/12] statx: Provide IOC flags for Windows fs attributes

2015-11-26 Thread Andreas Dilger
On Nov 26, 2015, at 8:35 AM, David Howells wrote: > > Theodore Ts'o wrote: > >> As a result, I would suggest that we not try to use the >> FS_IOC_[GS]ETFLAGS number scheme for any new interface, so we're at >> least not making a bad situation worse. >> >> The only reason why some other file sy

Re: [RFC][PATCH 00/12] Enhanced file stat system call

2015-11-26 Thread Andreas Dilger
On Nov 26, 2015, at 8:19 AM, David Howells wrote: > > Christoph Hellwig wrote: > >> from a quick look the statx bits looks fine in general. I think Ted >> last time had a problem with the IOC flag allocation, so you might >> want to ping him. > > Yeah - he commented on that. > >> But fsinfo

Re: [RFC][PATCH 00/12] Enhanced file stat system call

2015-11-25 Thread Andreas Dilger
On Nov 25, 2015, at 10:51 AM, J. Bruce Fields wrote: > > On Fri, Nov 20, 2015 at 04:28:35PM +, David Howells wrote: >> Martin Steigerwald wrote: >> >>> Any plans to add limitations of filesystem to the call like maximum file >>> size? I know its mostly relevant for just for FAT32, but on a

Re: [PATCH 01/12] Ext4: Fix extended timestamp encoding and decoding

2015-11-24 Thread Andreas Dilger
On Nov 20, 2015, at 7:54 AM, David Howells wrote: > > The handling of extended timestamps in Ext4 is broken as can be seen in the > output of the test program attached below: > > time extra bad decodegood decode bad encode good encode > = = =

Re: [RFC][PATCH 00/12] Enhanced file stat system call

2015-11-24 Thread Andreas Dilger
On Nov 20, 2015, at 9:50 AM, Casey Schaufler wrote: > On 11/20/2015 6:54 AM, David Howells wrote: >> Implement new system calls to provide enhanced file stats and enhanced >> filesystem stats. The patches can be found here: >> >> >> http://git.kernel.org/cgit/linux/kernel/git/dhowells/linu

Re: [PATCH v2 03/11] pmem: enable REQ_FUA/REQ_FLUSH handling

2015-11-13 Thread Andreas Dilger
On Nov 13, 2015, at 5:20 PM, Dan Williams wrote: > > On Fri, Nov 13, 2015 at 4:06 PM, Ross Zwisler > wrote: >> Currently the PMEM driver doesn't accept REQ_FLUSH or REQ_FUA bios. These >> are sent down via blkdev_issue_flush() in response to a fsync() or msync() >> and are used by filesystems t

Re: [PATCH v14 02/22] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags

2015-11-08 Thread Andreas Dilger
On Nov 7, 2015, at 10:44 AM, Andreas Gruenbacher wrote: > > On Fri, Nov 6, 2015 at 9:58 PM, Andreas Dilger wrote: >> I thought you proposed adding an enum for these parameters, and possibly >> making them a single parameter flag, to make the code in the caller more >>

Re: [PATCH v14 22/22] ext4: Add richacl feature flag

2015-11-08 Thread Andreas Dilger
l whether POSIX ACLs are enabled. When it is on, richacls are > automatically enabled and using the "noacl" mount option leads to an error. > > Signed-off-by: Aneesh Kumar K.V > Signed-off-by: Andreas Gruenbacher Reviewed-by: Andre

Re: [PATCH v14 11/22] vfs: Cache base_acl objects in inodes

2015-11-08 Thread Andreas Dilger
ve default acls). To allow an inode to cache either of the two kinds > of acls, introduce a new base_acl type and convert i_acl and > i_default_acl to that type. In most cases, the vfs then doesn't care which > kind of acl an inode caches (if any). > > Signed-off-by: Andreas

Re: [PATCH v14 03/22] vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD permission flags

2015-11-06 Thread Andreas Dilger
On Nov 5, 2015, at 4:39 AM, Andreas Gruenbacher wrote: > > Normally, deleting a file requires MAY_WRITE access to the parent > directory. With richacls, a file may be deleted with MAY_DELETE_CHILD access > to the parent directory or with MAY_DELETE_SELF access to the file. > > To support that,

Re: [PATCH v14 03/22] vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD permission flags

2015-11-06 Thread Andreas Dilger
On Nov 5, 2015, at 4:39 AM, Andreas Gruenbacher wrote: > > Normally, deleting a file requires MAY_WRITE access to the parent > directory. With richacls, a file may be deleted with MAY_DELETE_CHILD access > to the parent directory or with MAY_DELETE_SELF access to the file. > > To support that,

Re: [PATCH v14 04/22] vfs: Make the inode passed to inode_change_ok non-const

2015-11-06 Thread Andreas Dilger
anged to take a const struct inode, but it doesn't look possible. Reviewed-by: Andreas Dilger > Signed-off-by: Andreas Gruenbacher > Reviewed-by: J. Bruce Fields > --- > fs/attr.c | 2 +- > include/linux/fs.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletion

Re: [PATCH v14 02/22] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags

2015-11-06 Thread Andreas Dilger
On Nov 5, 2015, at 4:39 AM, Andreas Gruenbacher wrote: > > Richacls distinguish between creating non-directories and directories. To > support that, add an isdir parameter to may_create(). When checking > inode_permission() for create permission, pass in an additional > MAY_CREATE_FILE or MAY_CRE

Re: [PATCH v14 01/22] vfs: Add IS_ACL() and IS_RICHACL() tests

2015-11-06 Thread Andreas Dilger
> MS_RICHACL flag and IS_RICHACL() test for richacls alone. The IS_POSIXACL() > test is still needed by nfsd. > > Signed-off-by: Andreas Gruenbacher > Reviewed-by: J. Bruce Fields Looks good to me. Reviewed-by: Andreas Dilger > --- > fs/Kconfig | 3 +

Re: [PATCH v13 02/51] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags

2015-11-03 Thread Andreas Dilger
On Nov 3, 2015, at 8:16 AM, Andreas Gruenbacher wrote: > > Richacls distinguish between creating non-directories and directories. To > support that, add an isdir parameter to may_create(). When checking > inode_permission() for create permission, pass in an additional > MAY_CREATE_FILE or MAY_CRE

<    1   2   3   4   5   6   7   >