Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'xfs-misc-fixes-for-4.2' into for-next

+36 -23
+6 -6
Documentation/filesystems/xfs.txt
··· 236 236 237 237 Name Removed 238 238 ---- ------- 239 - delaylog/nodelaylog v3.20 240 - ihashsize v3.20 241 - irixsgid v3.20 242 - osyncisdsync/osyncisosync v3.20 239 + delaylog/nodelaylog v4.0 240 + ihashsize v4.0 241 + irixsgid v4.0 242 + osyncisdsync/osyncisosync v4.0 243 243 244 244 245 245 sysctls ··· 346 346 347 347 Name Removed 348 348 ---- ------- 349 - fs.xfs.xfsbufd_centisec v3.20 350 - fs.xfs.age_buffer_centisecs v3.20 349 + fs.xfs.xfsbufd_centisec v4.0 350 + fs.xfs.age_buffer_centisecs v4.0
+9 -1
fs/xfs/libxfs/xfs_bmap.c
··· 4424 4424 error = xfs_bmap_add_extent_unwritten_real(bma->tp, bma->ip, &bma->idx, 4425 4425 &bma->cur, mval, bma->firstblock, bma->flist, 4426 4426 &tmp_logflags); 4427 - bma->logflags |= tmp_logflags; 4427 + /* 4428 + * Log the inode core unconditionally in the unwritten extent conversion 4429 + * path because the conversion might not have done so (e.g., if the 4430 + * extent count hasn't changed). We need to make sure the inode is dirty 4431 + * in the transaction for the sake of fsync(), even if nothing has 4432 + * changed, because fsync() will not force the log for this transaction 4433 + * unless it sees the inode pinned. 4434 + */ 4435 + bma->logflags |= tmp_logflags | XFS_ILOG_CORE; 4428 4436 if (error) 4429 4437 return error; 4430 4438
+2 -2
fs/xfs/libxfs/xfs_format.h
··· 1453 1453 sizeof(struct xfs_acl_entry) * XFS_ACL_MAX_ENTRIES((mp))) 1454 1454 1455 1455 /* On-disk XFS extended attribute names */ 1456 - #define SGI_ACL_FILE (unsigned char *)"SGI_ACL_FILE" 1457 - #define SGI_ACL_DEFAULT (unsigned char *)"SGI_ACL_DEFAULT" 1456 + #define SGI_ACL_FILE "SGI_ACL_FILE" 1457 + #define SGI_ACL_DEFAULT "SGI_ACL_DEFAULT" 1458 1458 #define SGI_ACL_FILE_SIZE (sizeof(SGI_ACL_FILE)-1) 1459 1459 #define SGI_ACL_DEFAULT_SIZE (sizeof(SGI_ACL_DEFAULT)-1) 1460 1460
-1
fs/xfs/xfs_quota.h
··· 55 55 typedef struct xfs_dqtrx { 56 56 struct xfs_dquot *qt_dquot; /* the dquot this refers to */ 57 57 ulong qt_blk_res; /* blks reserved on a dquot */ 58 - ulong qt_blk_res_used; /* blks used from the reservation */ 59 58 ulong qt_ino_res; /* inode reserved on a dquot */ 60 59 ulong qt_ino_res_used; /* inodes used from the reservation */ 61 60 long qt_bcount_delta; /* dquot blk count changes */
+19 -13
fs/xfs/xfs_trans_dquot.c
··· 90 90 xfs_trans_t *ntp) 91 91 { 92 92 xfs_dqtrx_t *oq, *nq; 93 - int i,j; 93 + int i, j; 94 94 xfs_dqtrx_t *oqa, *nqa; 95 + ulong blk_res_used; 95 96 96 97 if (!otp->t_dqinfo) 97 98 return; ··· 103 102 * Because the quota blk reservation is carried forward, 104 103 * it is also necessary to carry forward the DQ_DIRTY flag. 105 104 */ 106 - if(otp->t_flags & XFS_TRANS_DQ_DIRTY) 105 + if (otp->t_flags & XFS_TRANS_DQ_DIRTY) 107 106 ntp->t_flags |= XFS_TRANS_DQ_DIRTY; 108 107 109 108 for (j = 0; j < XFS_QM_TRANS_DQTYPES; j++) { 110 109 oqa = otp->t_dqinfo->dqs[j]; 111 110 nqa = ntp->t_dqinfo->dqs[j]; 112 111 for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) { 112 + blk_res_used = 0; 113 + 113 114 if (oqa[i].qt_dquot == NULL) 114 115 break; 115 116 oq = &oqa[i]; 116 117 nq = &nqa[i]; 118 + 119 + if (oq->qt_blk_res && oq->qt_bcount_delta > 0) 120 + blk_res_used = oq->qt_bcount_delta; 117 121 118 122 nq->qt_dquot = oq->qt_dquot; 119 123 nq->qt_bcount_delta = nq->qt_icount_delta = 0; ··· 127 121 /* 128 122 * Transfer whatever is left of the reservations. 129 123 */ 130 - nq->qt_blk_res = oq->qt_blk_res - oq->qt_blk_res_used; 131 - oq->qt_blk_res = oq->qt_blk_res_used; 124 + nq->qt_blk_res = oq->qt_blk_res - blk_res_used; 125 + oq->qt_blk_res = blk_res_used; 132 126 133 127 nq->qt_rtblk_res = oq->qt_rtblk_res - 134 128 oq->qt_rtblk_res_used; ··· 245 239 * disk blocks used. 246 240 */ 247 241 case XFS_TRANS_DQ_BCOUNT: 248 - if (qtrx->qt_blk_res && delta > 0) { 249 - qtrx->qt_blk_res_used += (ulong)delta; 250 - ASSERT(qtrx->qt_blk_res >= qtrx->qt_blk_res_used); 251 - } 252 242 qtrx->qt_bcount_delta += delta; 253 243 break; 254 244 ··· 425 423 * reservation that a transaction structure knows of. 426 424 */ 427 425 if (qtrx->qt_blk_res != 0) { 428 - if (qtrx->qt_blk_res != qtrx->qt_blk_res_used) { 429 - if (qtrx->qt_blk_res > 430 - qtrx->qt_blk_res_used) 426 + ulong blk_res_used = 0; 427 + 428 + if (qtrx->qt_bcount_delta > 0) 429 + blk_res_used = qtrx->qt_bcount_delta; 430 + 431 + if (qtrx->qt_blk_res != blk_res_used) { 432 + if (qtrx->qt_blk_res > blk_res_used) 431 433 dqp->q_res_bcount -= (xfs_qcnt_t) 432 434 (qtrx->qt_blk_res - 433 - qtrx->qt_blk_res_used); 435 + blk_res_used); 434 436 else 435 437 dqp->q_res_bcount -= (xfs_qcnt_t) 436 - (qtrx->qt_blk_res_used - 438 + (blk_res_used - 437 439 qtrx->qt_blk_res); 438 440 } 439 441 } else {