Just getting up to speed on this patch, so only a few cosmetic
comments so far:
+ if (ap->flags & XFS_BMAPI_COWFORK) {
+ xfs_bmap_btalloc_quota_cow(ap, &args);
+ } else {
+ ap->ip->i_d.di_nblocks += args.len;
+ xfs_trans_log_inode(ap->tp, ap->ip, XFS_ILOG_CORE);
+ /*
+ * Adjust the disk quota also. This was reserved
+ * earlier.
+ */
+ xfs_trans_mod_dquot_byino(ap->tp, ap->ip,
+ ap->wasdel ? XFS_TRANS_DQ_DELBCOUNT :
+ XFS_TRANS_DQ_BCOUNT,
+ (long) args.len);
+ }
Shouldn't we instead have a helper for the whole above section?