Skip to contentSkip to conversation

journaled quota file question

DISCUSSION Dmitry Monakhov 2 participants 3 messages Oct 27, 2009 – Nov 2, 2009

lore
Share & tools
lore
#0 lore raw

While looking to ext3/4 quota code I'm wondering
Why do we have to place journaled quota file on fs root? In some situations it may be useful to place it deeper for example:
/root/dir/quota_file
The only reason what comes in to my mind is that some one may rename parent folder rename("/root/dir", "/root/dir2") Is this the only reason?

#1 lore raw
Quoted 7 lines · Dmitry Monakhov

While looking to ext3/4 quota code I'm wondering
Why do we have to place journaled quota file on fs root? In some situations it may be useful to place it deeper for example:
/root/dir/quota_file
The only reason what comes in to my mind is that some one may rename parent folder rename("/root/dir", "/root/dir2") Is this the only reason?

add an author in cc:

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Hi,

Quoted 9 lines · Dmitry Monakhov
Quoted 7 lines · Dmitry Monakhov

While looking to ext3/4 quota code I'm wondering
Why do we have to place journaled quota file on fs root? In some situations it may be useful to place it deeper for example:
/root/dir/quota_file
The only reason what comes in to my mind is that some one may rename parent folder rename("/root/dir", "/root/dir2") Is this the only reason?

Well, the reason is that we have to read & write the files during orphan
recovery on mount. A that time the filesystem is not fully set up so you cannot use VFS directory traversal code and I didn't want to implement ext[34] specific one. Also as you write above, if you have quota files in some subdirectory, there are more possibilities for failure.
Admittedly, I don't see a big point in having quota files in some other
directory. In fact, they should rather be system files not visible in any directory but that requires rather non-trivial changes to repquota and moving quotacheck functionality to fsck and I never got to doing that.

Quoted 1 line

add an author in cc:

Thanks.

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR