Whamcloud - gitweb
LU-6824 ldiskfs: give warning with dir htree growing 48/15548/16
authorWang Shilong <wshilong@ddn.com>
Fri, 3 Jul 2015 01:04:45 +0000 (21:04 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 6 Jan 2016 03:01:45 +0000 (03:01 +0000)
commit07660ad33a7d109cced29b6400f99f25adab3f54
treee302436550db97deac16182283ce47c7cd1a6ced
parenta5dc6abb06215856dde2d572f7d4c24dddebb718
LU-6824 ldiskfs: give warning with dir htree growing

Currently without large dir feature, ldiskfs directory hash tree
will be limited 2 height, this means directory size is limited about
1GB, and in fact users are likely to hit ENOSPC when reaching half of
limit because of bad hash. tested by following scripts.

i=0
filename="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbb"
while [ 1 ]
do
        touch $filename"$i"
        if [ $? -ne 0 ];then
                break
        fi
        ((i++))
done

When directoy size grow about 590M, we hit ENOSPC. Better way is to
add support to e2fsprogs so that we can use large dir feature.
As a walkaround way, this patch try to give warning messages to
console when 10/16 and 11/16 of limit reach.

So this patch will try to give following messages when warning
limit or hash index tree limit reach:

Directory (inode: 8388610 FID: [0x200000401:0x1:0x0]) has approached
maximum limit.

Directory (inode: 8388610 FID: [0x200000401:0x1:0x0]) is approaching
maximum limit.

FID output here is useful for administrators to locate lustre
file path

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I7f78c421bbb89f76298e0174cc46d774ea82eb06
Reviewed-on: http://review.whamcloud.com/15548
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
12 files changed:
ldiskfs/kernel_patches/patches/rhel6.5/ext4-give-warning-with-dir-htree-growing.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/rhel7/ext4-give-warning-with-dir-htree-growing.patch [new file with mode: 0644]
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.5.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.6.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.7.series
ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11sp3.series
ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.series
lustre/osd-ldiskfs/osd_compat.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_oi.c
lustre/tests/sanity.sh