[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <138552dd-c323-f9f9-9b26-84346527fd05@huawei.com>
Date: Sun, 19 Mar 2023 13:44:57 +0800
From: Zhiqiang Liu <liuzhiqiang26@...wei.com>
To: Theodore Ts'o <tytso@....edu>
CC: Ext4 Developers List <linux-ext4@...r.kernel.org>,
<adilger@...mcloud.com>, Jan Kara <jack@...e.cz>,
linfeilong <linfeilong@...wei.com>,
wuguanghao <wuguanghao3@...wei.com>,
zhanchengbin <zhanchengbin1@...wei.com>, <libaokun1@...wei.com>
Subject: Re: [PATCH] tune2fs: check whether dev is mounted or in use before
setting
On 2023/3/19 0:24, Theodore Ts'o wrote:
> On Sat, Mar 18, 2023 at 11:36:03AM +0800, Zhiqiang Liu wrote:
>> From: Zhiqiang Liu <liuzhiqiang26@...wei.com>
>>
>> tune2fs is used to adjust various tunable filesystem pars, which
>> may conflict with kernel operations. So we should check whether
>> device is mounted or in use at the begin similar to e2fsck and mke2fs.
>>
>> Of course, we can ignore this check if -f is set.
>
> Tune2fs is designed to work on mounted file systems. There are
> individual checks for those changes which can not be safely done on
> mounted file systems, but most changes are safe to do on mounted file
> systems.
>
Thanks for your reply.
Does quota setting is safely done on mounted or busy filesystems?
We have met a problem as follows,
# mkfs.ext4 /dev/sdd
# mount /dev/sdd /test
# /test mountpoint is used in other namespace
# umount /dev/sdd
# tune2fs -O project,quota /dev/sdd
# mount -o prjquota /dev/sdd /test
# mount | grep sdd
/dev/sdd on /test type ext4 (rw,relatime,seclabel,prjquota)
# quotaon -Ppv /test
quotaon: Mountpoint (or device) /test not found or has no quota enabled
Here, tune2fs only check whether /test is mountted when setting project,quota,
it does not check whether /test is busy (/test is mounted in other namespace).
Users will be very confused about why prjquota does no take effect.
Should we check whether mountpoint is busy when setting quota?
Zhiqiang Liu.
> Cheers,
>
> - Ted
>
> .
>
Powered by blists - more mailing lists