> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Jan Kara wrote: > > You are right that the quota code and xattrs need to do the same thing. > > We only need to do slight interface changes (currently functions take a > > superblock and a type and pick appropriate quota inode themselves) and > > function renaming. I would vote for renaming the s_op->quota_{read,write} > > to s_op->internal_{read,write} and pass appropriate inode directly from > > the quota code. The only thing I'm not sure about is how to deal with the > > journaling mode - quota code either uses data journaling or just ordered > > mode depending on mount options (journaled / non-journaled quota). So we > > probably also need to pass the journaling mode to the write function. > > BTW: note that using these functions bypassing page cache means that > > userspace really should not touch these files. It is asking for data > > corruption. Quota code does during quotaon sync the quota inode and > > set it as immutable to prevent accidents. Also during quotaoff it flushes > > the page cache of the inode so that userspace is able to see the changes > > made by kernel. I guess something similar will be needed for xattrs too. > > If you feel that changing the entire quota system to reflect the change > is a good plan, that's your call. Personally, I'd like to keep the > patches as small as possible, but if you think there is a need for > internal_{read,write} elsewhere, I wouldn't object. OK, when I'm thinking about it in the morning, you're probably right. And I can do the bigger change if I see that more filesystems would use it too.
> The data journaling mode can be set as a flag associated with the inode. > Currently, i_data_log is set in REISERFS_I(inode)->i_flags. I add > i_data_ordered in one of my later patches. They can be tested easily > with reiserfs_file_data_{log,ordered}. There's no reason that one > couldn't be moved up and made a prerequisite for the first patch. Fine. So we can just set proper journaling flags in reiserfs_quota_on and then honor them in the internal writing functions. Honza -- Jan Kara <[EMAIL PROTECTED]> SuSE CR Labs