On Mon, Feb 20, 2012 at 03:06:48PM +0900, Guk-Bong, Kwon wrote:
> [help] xfs quotacheck problem when xfs filesystem mount
> hi all..
> i test xfs project quota with various version vanilla kernel
> Test Scenario
> 1. mkfs.xfs -i size=512 -l lazy-count=1 /dev/ld/lv1
> 2. xfs filesystem mount with project quota. and setting project quota
> 3. make many file into xfs filesystem (eg. 1K~1M size, number 300 million
> 4. xfs filesystem umount
> 5. xfs filesystem mount without project quota
> 6. make some file
> 7. umount xfs filesystem
> 8. again mount with project quota
> some kernel is ok when mount with project quota
> some kernel is occurs oom-killer when mount with project quota
> i tested kernel version 184.108.40.206, 220.127.116.11, 3.1.10.
> only 18.104.22.168 kernel is not occurs oom-killer.
Hmmm. I thought we fixed that problem. Indeed:
$ glo -n 1 704b290
704b290 xfs: register the inode cache shrinker before quotachecks
$ git describe --contains 704b290
So it was fixed in 2.6.39. Why is 3.1 seeing this problem? Oh:
$ glo -n 1 8daaa83
8daaa83 xfs: make use of new shrinker callout for the inode cache
Which makes XFS use the superblock shrinker infrastructure seems to
be causing the problem. quotacheck is called during
xfs_fs_fill_super(), which is called with the sb->s_umount locked in
exclusive mode, and the shrinker (prune_super()) needs to get the
lock in shared mode to run. Hence the shrinker doesn't run while
quotacheck is in progress.
I'll have to think about this one for a bit - I'm not sure what the
best way to solve it is yet.