Re: [PATCH 28/28] quota: add extra inode count to dquot transfer functions
Tahsin Erdogan via Jfs-discussion <[email protected]>
| Newsgroups | gmane.comp.file-systems.jfs.general |
|---|---|
| Message-ID | <CAAeU0aM=QDb-iCnr5KVatQmmbQy8A7XmbyFBttK72SGt3oNTUg__10720.4000036747$1497872785$gmane$org@mail.gmail.com> |
>> I tried that approach by adding a "int get_inode_usage(struct inode >> *inode, qsize_t *usage)" callback to dquot_operations. Unfortunately, >> ext4 code that calculates the number of internal inodes >> (ext4_xattr_inode_count()) is subject to failures so the callback has >> to be able to report errors. And, that itself is problematic because >> we can't afford to have errors in dquot_free_inode(). If you have >> thoughts about how to address this please let me know. > > Well, you can just make dquot_free_inode() return error. Now most callers > won't be able to do much with an error from dquot_free_inode() but that's > the case also for other things during inode deletion - just handle it as > other fatal failures during inode freeing. > I just checked dquot_free_inode() to see whether it calls anything that could fail. It calls mark_all_dquot_dirty() and ignores the return code from it. I would like to follow the same for the get_inode_usage() as the only use case for get_inode_usage() (ext4) should not fail at inode free time. Basically, I want to avoid changing return type from void to int because it would create a new responsibility for the filesystem implementations who do not know how to deal with it. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot