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 | <CAAeU0aNgon_ERWyUNmAGaBCuk3dU9qAxA7QnZ4D8cb5g6JZcPg__7370.34968701682$1497664284$gmane$org@mail.gmail.com> |
On Thu, Jun 15, 2017 at 12:57 AM, Jan Kara <[email protected]> wrote: > Hum, rather handle this similarly to how we handle delalloc reserved space. > Add a callback to dq_ops to get "inode usage" of an inode and then use it > in dquot_transfer(), dquot_free_inode(), dquot_alloc_inode(). 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. Alternatively, I could try to make this patch less intrusive by keeping the existing dquot_transfer() signature and add a new dquot_transfer_usage() that accepts inode_usage as a parameter. What do you think? ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot