Thread (60 messages) 60 messages, 4 authors, 2018-01-27

Re: [PATCH v2 04/11] xfs: CoW fork operations should only update quota reservations

From: Christoph Hellwig <hch@infradead.org>
Date: 2018-01-26 12:12:14

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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help