diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-12-19 15:20:44 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-12-19 15:21:54 -0500 |
commit | 99ccaf73a8b92d6cb5d6892142a12468081a2b0d (patch) | |
tree | 33485dc8938ec4ff92fd653fae58355a85e861cc /libbcachefs/fs.h | |
parent | f9ba96e16535a653b97f7f1f953fabf477737a96 (diff) |
Update bcachefs sources to 2724e115d2 bcachefs: Lots of option handling improvements
Diffstat (limited to 'libbcachefs/fs.h')
-rw-r--r-- | libbcachefs/fs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libbcachefs/fs.h b/libbcachefs/fs.h index 7dc0453a..9ac6fc87 100644 --- a/libbcachefs/fs.h +++ b/libbcachefs/fs.h @@ -104,6 +104,19 @@ int bch2_fs_quota_transfer(struct bch_fs *, unsigned, enum quota_acct_mode); +static inline int bch2_set_projid(struct bch_fs *c, + struct bch_inode_info *inode, + u32 projid) +{ + struct bch_qid qid = inode->ei_qid; + + qid.q[QTYP_PRJ] = projid; + + return bch2_fs_quota_transfer(c, inode, qid, + 1 << QTYP_PRJ, + KEY_TYPE_QUOTA_PREALLOC); +} + struct inode *bch2_vfs_inode_get(struct bch_fs *, u64); /* returns 0 if we want to do the update, or error is passed up */ |