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

Merge tag 'xfs-6.1-for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs updates from Dave Chinner:
"There are relatively few updates this cycle; half the cycle was eaten
by a grue, the other half was eaten by a tricky data corruption issue
that I still haven't entirely solved.

Hence there's no major changes in this cycle and it's largely just
minor cleanups and small bug fixes:

- fixes for filesystem shutdown procedure during a DAX memory failure
notification

- bug fixes

- logic cleanups

- log message cleanups

- updates to use vfs{g,u}id_t helpers where appropriate"

* tag 'xfs-6.1-for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
xfs: on memory failure, only shut down fs after scanning all mappings
xfs: rearrange the logic and remove the broken comment for xfs_dir2_isxx
xfs: trim the mapp array accordingly in xfs_da_grow_inode_int
xfs: do not need to check return value of xlog_kvmalloc()
xfs: port to vfs{g,u}id_t and associated helpers
xfs: remove xfs_setattr_time() declaration
xfs: Remove the unneeded result variable
xfs: missing space in xfs trace log
xfs: simplify if-else condition in xfs_reflink_trim_around_shared
xfs: simplify if-else condition in xfs_validate_new_dalign
xfs: replace unnecessary seq_printf with seq_puts
xfs: clean up "%Ld/%Lu" which doesn't meet C standard
xfs: remove redundant else for clean code
xfs: remove the redundant word in comment

+116 -98
+1 -1
fs/xfs/libxfs/xfs_bmap.c
··· 294 294 else 295 295 thispa = XFS_BMBT_PTR_ADDR(mp, block, j, dmxr); 296 296 if (*thispa == *pp) { 297 - xfs_warn(mp, "%s: thispa(%d) == pp(%d) %Ld", 297 + xfs_warn(mp, "%s: thispa(%d) == pp(%d) %lld", 298 298 __func__, j, i, 299 299 (unsigned long long)be64_to_cpu(*thispa)); 300 300 xfs_err(mp, "%s: ptrs are equal in node\n",
+1 -1
fs/xfs/libxfs/xfs_da_btree.c
··· 2192 2192 */ 2193 2193 mapp = kmem_alloc(sizeof(*mapp) * count, 0); 2194 2194 for (b = *bno, mapi = 0; b < *bno + count; ) { 2195 - nmap = min(XFS_BMAP_MAX_NMAP, count); 2196 2195 c = (int)(*bno + count - b); 2196 + nmap = min(XFS_BMAP_MAX_NMAP, c); 2197 2197 error = xfs_bmapi_write(tp, dp, b, c, 2198 2198 xfs_bmapi_aflag(w)|XFS_BMAPI_METADATA, 2199 2199 args->total, &mapp[mapi], &nmap);
+30 -20
fs/xfs/libxfs/xfs_dir2.c
··· 261 261 { 262 262 struct xfs_da_args *args; 263 263 int rval; 264 - int v; /* type-checking value */ 264 + bool v; 265 265 266 266 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); 267 267 ··· 357 357 { 358 358 struct xfs_da_args *args; 359 359 int rval; 360 - int v; /* type-checking value */ 360 + bool v; 361 361 int lock_mode; 362 362 363 363 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); ··· 435 435 { 436 436 struct xfs_da_args *args; 437 437 int rval; 438 - int v; /* type-checking value */ 438 + bool v; 439 439 440 440 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); 441 441 XFS_STATS_INC(dp->i_mount, xs_dir_remove); ··· 493 493 { 494 494 struct xfs_da_args *args; 495 495 int rval; 496 - int v; /* type-checking value */ 496 + bool v; 497 497 498 498 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); 499 499 ··· 610 610 int 611 611 xfs_dir2_isblock( 612 612 struct xfs_da_args *args, 613 - int *vp) /* out: 1 is block, 0 is not block */ 613 + bool *isblock) 614 614 { 615 - xfs_fileoff_t last; /* last file offset */ 616 - int rval; 615 + struct xfs_mount *mp = args->dp->i_mount; 616 + xfs_fileoff_t eof; 617 + int error; 617 618 618 - if ((rval = xfs_bmap_last_offset(args->dp, &last, XFS_DATA_FORK))) 619 - return rval; 620 - rval = XFS_FSB_TO_B(args->dp->i_mount, last) == args->geo->blksize; 621 - if (XFS_IS_CORRUPT(args->dp->i_mount, 622 - rval != 0 && 623 - args->dp->i_disk_size != args->geo->blksize)) 619 + error = xfs_bmap_last_offset(args->dp, &eof, XFS_DATA_FORK); 620 + if (error) 621 + return error; 622 + 623 + *isblock = false; 624 + if (XFS_FSB_TO_B(mp, eof) != args->geo->blksize) 625 + return 0; 626 + 627 + *isblock = true; 628 + if (XFS_IS_CORRUPT(mp, args->dp->i_disk_size != args->geo->blksize)) 624 629 return -EFSCORRUPTED; 625 - *vp = rval; 626 630 return 0; 627 631 } 628 632 ··· 636 632 int 637 633 xfs_dir2_isleaf( 638 634 struct xfs_da_args *args, 639 - int *vp) /* out: 1 is block, 0 is not block */ 635 + bool *isleaf) 640 636 { 641 - xfs_fileoff_t last; /* last file offset */ 642 - int rval; 637 + xfs_fileoff_t eof; 638 + int error; 643 639 644 - if ((rval = xfs_bmap_last_offset(args->dp, &last, XFS_DATA_FORK))) 645 - return rval; 646 - *vp = last == args->geo->leafblk + args->geo->fsbcount; 640 + error = xfs_bmap_last_offset(args->dp, &eof, XFS_DATA_FORK); 641 + if (error) 642 + return error; 643 + 644 + *isleaf = false; 645 + if (eof != args->geo->leafblk + args->geo->fsbcount) 646 + return 0; 647 + 648 + *isleaf = true; 647 649 return 0; 648 650 } 649 651
+2 -2
fs/xfs/libxfs/xfs_dir2.h
··· 61 61 /* 62 62 * Interface routines used by userspace utilities 63 63 */ 64 - extern int xfs_dir2_isblock(struct xfs_da_args *args, int *r); 65 - extern int xfs_dir2_isleaf(struct xfs_da_args *args, int *r); 64 + extern int xfs_dir2_isblock(struct xfs_da_args *args, bool *isblock); 65 + extern int xfs_dir2_isleaf(struct xfs_da_args *args, bool *isleaf); 66 66 extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db, 67 67 struct xfs_buf *bp); 68 68
+1 -3
fs/xfs/libxfs/xfs_dir2_sf.c
··· 865 865 struct xfs_inode *dp = args->dp; 866 866 struct xfs_mount *mp = dp->i_mount; 867 867 int i; /* entry index */ 868 - int error; 869 868 xfs_dir2_sf_entry_t *sfep; /* shortform directory entry */ 870 869 xfs_dir2_sf_hdr_t *sfp; /* shortform structure */ 871 870 enum xfs_dacmp cmp; /* comparison result */ ··· 928 929 if (!ci_sfep) 929 930 return -ENOENT; 930 931 /* otherwise process the CI match as required by the caller */ 931 - error = xfs_dir_cilookup_result(args, ci_sfep->name, ci_sfep->namelen); 932 - return error; 932 + return xfs_dir_cilookup_result(args, ci_sfep->name, ci_sfep->namelen); 933 933 } 934 934 935 935 /*
+2 -2
fs/xfs/libxfs/xfs_inode_fork.c
··· 78 78 */ 79 79 if (unlikely(size > XFS_DFORK_SIZE(dip, ip->i_mount, whichfork))) { 80 80 xfs_warn(ip->i_mount, 81 - "corrupt inode %Lu (bad size %d for local fork, size = %zd).", 81 + "corrupt inode %llu (bad size %d for local fork, size = %zd).", 82 82 (unsigned long long) ip->i_ino, size, 83 83 XFS_DFORK_SIZE(dip, ip->i_mount, whichfork)); 84 84 xfs_inode_verifier_error(ip, -EFSCORRUPTED, ··· 192 192 XFS_DFORK_SIZE(dip, mp, whichfork) || 193 193 ifp->if_nextents > ip->i_nblocks) || 194 194 level == 0 || level > XFS_BM_MAXLEVELS(mp, whichfork)) { 195 - xfs_warn(mp, "corrupt inode %Lu (btree).", 195 + xfs_warn(mp, "corrupt inode %llu (btree).", 196 196 (unsigned long long) ip->i_ino); 197 197 xfs_inode_verifier_error(ip, -EFSCORRUPTED, 198 198 "xfs_iformat_btree", dfp, size,
+1 -1
fs/xfs/scrub/dir.c
··· 676 676 xfs_dablk_t dabno; 677 677 xfs_dir2_db_t last_data_db = 0; 678 678 bool found; 679 - int is_block = 0; 679 + bool is_block = false; 680 680 int error; 681 681 682 682 /* Ignore local format directories. */
-6
fs/xfs/xfs_attr_item.c
··· 86 86 */ 87 87 nv = xlog_kvmalloc(sizeof(struct xfs_attri_log_nameval) + 88 88 name_len + value_len); 89 - if (!nv) 90 - return nv; 91 89 92 90 nv->name.i_addr = nv + 1; 93 91 nv->name.i_len = name_len; ··· 439 441 attr->xattri_nameval = xfs_attri_log_nameval_alloc(args->name, 440 442 args->namelen, args->value, args->valuelen); 441 443 } 442 - if (!attr->xattri_nameval) 443 - return ERR_PTR(-ENOMEM); 444 444 445 445 attrip = xfs_attri_init(mp, attr->xattri_nameval); 446 446 xfs_trans_add_item(tp, &attrip->attri_item); ··· 758 762 nv = xfs_attri_log_nameval_alloc(attr_name, 759 763 attri_formatp->alfi_name_len, attr_value, 760 764 attri_formatp->alfi_value_len); 761 - if (!nv) 762 - return -ENOMEM; 763 765 764 766 attrip = xfs_attri_init(mp, nv); 765 767 error = xfs_attri_copy_format(&item->ri_buf[0], &attrip->attri_format);
+1 -1
fs/xfs/xfs_dir2_readdir.c
··· 512 512 { 513 513 struct xfs_da_args args = { NULL }; 514 514 unsigned int lock_mode; 515 - int isblock; 515 + bool isblock; 516 516 int error; 517 517 518 518 trace_xfs_readdir(dp);
+6 -7
fs/xfs/xfs_inode.c
··· 835 835 * ID or one of the supplementary group IDs, the S_ISGID bit is cleared 836 836 * (and only if the irix_sgid_inherit compatibility variable is set). 837 837 */ 838 - if (irix_sgid_inherit && 839 - (inode->i_mode & S_ISGID) && 840 - !in_group_p(i_gid_into_mnt(mnt_userns, inode))) 838 + if (irix_sgid_inherit && (inode->i_mode & S_ISGID) && 839 + !vfsgid_in_group_p(i_gid_into_vfsgid(mnt_userns, inode))) 841 840 inode->i_mode &= ~S_ISGID; 842 841 843 842 ip->i_disk_size = 0; ··· 3118 3119 if (XFS_TEST_ERROR(dip->di_magic != cpu_to_be16(XFS_DINODE_MAGIC), 3119 3120 mp, XFS_ERRTAG_IFLUSH_1)) { 3120 3121 xfs_alert_tag(mp, XFS_PTAG_IFLUSH, 3121 - "%s: Bad inode %Lu magic number 0x%x, ptr "PTR_FMT, 3122 + "%s: Bad inode %llu magic number 0x%x, ptr "PTR_FMT, 3122 3123 __func__, ip->i_ino, be16_to_cpu(dip->di_magic), dip); 3123 3124 goto flush_out; 3124 3125 } ··· 3128 3129 ip->i_df.if_format != XFS_DINODE_FMT_BTREE, 3129 3130 mp, XFS_ERRTAG_IFLUSH_3)) { 3130 3131 xfs_alert_tag(mp, XFS_PTAG_IFLUSH, 3131 - "%s: Bad regular inode %Lu, ptr "PTR_FMT, 3132 + "%s: Bad regular inode %llu, ptr "PTR_FMT, 3132 3133 __func__, ip->i_ino, ip); 3133 3134 goto flush_out; 3134 3135 } ··· 3139 3140 ip->i_df.if_format != XFS_DINODE_FMT_LOCAL, 3140 3141 mp, XFS_ERRTAG_IFLUSH_4)) { 3141 3142 xfs_alert_tag(mp, XFS_PTAG_IFLUSH, 3142 - "%s: Bad directory inode %Lu, ptr "PTR_FMT, 3143 + "%s: Bad directory inode %llu, ptr "PTR_FMT, 3143 3144 __func__, ip->i_ino, ip); 3144 3145 goto flush_out; 3145 3146 } ··· 3157 3158 if (XFS_TEST_ERROR(ip->i_forkoff > mp->m_sb.sb_inodesize, 3158 3159 mp, XFS_ERRTAG_IFLUSH_6)) { 3159 3160 xfs_alert_tag(mp, XFS_PTAG_IFLUSH, 3160 - "%s: bad inode %Lu, forkoff 0x%x, ptr "PTR_FMT, 3161 + "%s: bad inode %llu, forkoff 0x%x, ptr "PTR_FMT, 3161 3162 __func__, ip->i_ino, ip->i_forkoff, ip); 3162 3163 goto flush_out; 3163 3164 }
+1 -1
fs/xfs/xfs_inode_item.c
··· 550 550 551 551 if (!bp || (ip->i_flags & XFS_ISTALE)) { 552 552 /* 553 - * Inode item/buffer is being being aborted due to cluster 553 + * Inode item/buffer is being aborted due to cluster 554 554 * buffer deletion. Trigger a log force to have that operation 555 555 * completed and items removed from the AIL before the next push 556 556 * attempt.
+2 -2
fs/xfs/xfs_inode_item_recover.c
··· 321 321 */ 322 322 if (XFS_IS_CORRUPT(mp, !xfs_verify_magic16(bp, dip->di_magic))) { 323 323 xfs_alert(mp, 324 - "%s: Bad inode magic number, dip = "PTR_FMT", dino bp = "PTR_FMT", ino = %Ld", 324 + "%s: Bad inode magic number, dip = "PTR_FMT", dino bp = "PTR_FMT", ino = %lld", 325 325 __func__, dip, bp, in_f->ilf_ino); 326 326 error = -EFSCORRUPTED; 327 327 goto out_release; ··· 329 329 ldip = item->ri_buf[1].i_addr; 330 330 if (XFS_IS_CORRUPT(mp, ldip->di_magic != XFS_DINODE_MAGIC)) { 331 331 xfs_alert(mp, 332 - "%s: Bad inode log record, rec ptr "PTR_FMT", ino %Ld", 332 + "%s: Bad inode log record, rec ptr "PTR_FMT", ino %lld", 333 333 __func__, item, in_f->ilf_ino); 334 334 error = -EFSCORRUPTED; 335 335 goto out_release;
+4 -2
fs/xfs/xfs_iops.c
··· 558 558 struct inode *inode = d_inode(path->dentry); 559 559 struct xfs_inode *ip = XFS_I(inode); 560 560 struct xfs_mount *mp = ip->i_mount; 561 + vfsuid_t vfsuid = i_uid_into_vfsuid(mnt_userns, inode); 562 + vfsgid_t vfsgid = i_gid_into_vfsgid(mnt_userns, inode); 561 563 562 564 trace_xfs_getattr(ip); 563 565 ··· 570 568 stat->dev = inode->i_sb->s_dev; 571 569 stat->mode = inode->i_mode; 572 570 stat->nlink = inode->i_nlink; 573 - stat->uid = i_uid_into_mnt(mnt_userns, inode); 574 - stat->gid = i_gid_into_mnt(mnt_userns, inode); 571 + stat->uid = vfsuid_into_kuid(vfsuid); 572 + stat->gid = vfsgid_into_kgid(vfsgid); 575 573 stat->ino = ip->i_ino; 576 574 stat->atime = inode->i_atime; 577 575 stat->mtime = inode->i_mtime;
-1
fs/xfs/xfs_iops.h
··· 13 13 14 14 extern ssize_t xfs_vn_listxattr(struct dentry *, char *data, size_t size); 15 15 16 - extern void xfs_setattr_time(struct xfs_inode *ip, struct iattr *iattr); 17 16 int xfs_vn_setattr_size(struct user_namespace *mnt_userns, 18 17 struct dentry *dentry, struct iattr *vap); 19 18
+6 -2
fs/xfs/xfs_itable.c
··· 66 66 struct xfs_bulkstat *buf = bc->buf; 67 67 xfs_extnum_t nextents; 68 68 int error = -EINVAL; 69 + vfsuid_t vfsuid; 70 + vfsgid_t vfsgid; 69 71 70 72 if (xfs_internal_inum(mp, ino)) 71 73 goto out_advance; ··· 83 81 ASSERT(ip != NULL); 84 82 ASSERT(ip->i_imap.im_blkno != 0); 85 83 inode = VFS_I(ip); 84 + vfsuid = i_uid_into_vfsuid(mnt_userns, inode); 85 + vfsgid = i_gid_into_vfsgid(mnt_userns, inode); 86 86 87 87 /* xfs_iget returns the following without needing 88 88 * further change. 89 89 */ 90 90 buf->bs_projectid = ip->i_projid; 91 91 buf->bs_ino = ino; 92 - buf->bs_uid = from_kuid(sb_userns, i_uid_into_mnt(mnt_userns, inode)); 93 - buf->bs_gid = from_kgid(sb_userns, i_gid_into_mnt(mnt_userns, inode)); 92 + buf->bs_uid = from_kuid(sb_userns, vfsuid_into_kuid(vfsuid)); 93 + buf->bs_gid = from_kgid(sb_userns, vfsgid_into_kgid(vfsgid)); 94 94 buf->bs_size = ip->i_disk_size; 95 95 96 96 buf->bs_nlink = inode->i_nlink;
+5 -5
fs/xfs/xfs_log.c
··· 226 226 if (head == &log->l_write_head) { 227 227 ASSERT(tic->t_flags & XLOG_TIC_PERM_RESERV); 228 228 return tic->t_unit_res; 229 - } else { 230 - if (tic->t_flags & XLOG_TIC_PERM_RESERV) 231 - return tic->t_unit_res * tic->t_cnt; 232 - else 233 - return tic->t_unit_res; 234 229 } 230 + 231 + if (tic->t_flags & XLOG_TIC_PERM_RESERV) 232 + return tic->t_unit_res * tic->t_cnt; 233 + 234 + return tic->t_unit_res; 235 235 } 236 236 237 237 STATIC bool
+20 -18
fs/xfs/xfs_mount.c
··· 300 300 "alignment check failed: sunit/swidth vs. blocksize(%d)", 301 301 mp->m_sb.sb_blocksize); 302 302 return -EINVAL; 303 - } else { 304 - /* 305 - * Convert the stripe unit and width to FSBs. 306 - */ 307 - mp->m_dalign = XFS_BB_TO_FSBT(mp, mp->m_dalign); 308 - if (mp->m_dalign && (mp->m_sb.sb_agblocks % mp->m_dalign)) { 309 - xfs_warn(mp, 310 - "alignment check failed: sunit/swidth vs. agsize(%d)", 311 - mp->m_sb.sb_agblocks); 312 - return -EINVAL; 313 - } else if (mp->m_dalign) { 314 - mp->m_swidth = XFS_BB_TO_FSBT(mp, mp->m_swidth); 315 - } else { 316 - xfs_warn(mp, 317 - "alignment check failed: sunit(%d) less than bsize(%d)", 318 - mp->m_dalign, mp->m_sb.sb_blocksize); 319 - return -EINVAL; 320 - } 321 303 } 304 + 305 + /* 306 + * Convert the stripe unit and width to FSBs. 307 + */ 308 + mp->m_dalign = XFS_BB_TO_FSBT(mp, mp->m_dalign); 309 + if (mp->m_dalign && (mp->m_sb.sb_agblocks % mp->m_dalign)) { 310 + xfs_warn(mp, 311 + "alignment check failed: sunit/swidth vs. agsize(%d)", 312 + mp->m_sb.sb_agblocks); 313 + return -EINVAL; 314 + } 315 + 316 + if (!mp->m_dalign) { 317 + xfs_warn(mp, 318 + "alignment check failed: sunit(%d) less than bsize(%d)", 319 + mp->m_dalign, mp->m_sb.sb_blocksize); 320 + return -EINVAL; 321 + } 322 + 323 + mp->m_swidth = XFS_BB_TO_FSBT(mp, mp->m_swidth); 322 324 323 325 if (!xfs_has_dalign(mp)) { 324 326 xfs_warn(mp,
+17 -9
fs/xfs/xfs_notify_failure.c
··· 23 23 #include <linux/mm.h> 24 24 #include <linux/dax.h> 25 25 26 - struct failure_info { 26 + struct xfs_failure_info { 27 27 xfs_agblock_t startblock; 28 28 xfs_extlen_t blockcount; 29 29 int mf_flags; 30 + bool want_shutdown; 30 31 }; 31 32 32 33 static pgoff_t 33 34 xfs_failure_pgoff( 34 35 struct xfs_mount *mp, 35 36 const struct xfs_rmap_irec *rec, 36 - const struct failure_info *notify) 37 + const struct xfs_failure_info *notify) 37 38 { 38 39 loff_t pos = XFS_FSB_TO_B(mp, rec->rm_offset); 39 40 ··· 48 47 xfs_failure_pgcnt( 49 48 struct xfs_mount *mp, 50 49 const struct xfs_rmap_irec *rec, 51 - const struct failure_info *notify) 50 + const struct xfs_failure_info *notify) 52 51 { 53 52 xfs_agblock_t end_rec; 54 53 xfs_agblock_t end_notify; ··· 72 71 { 73 72 struct xfs_mount *mp = cur->bc_mp; 74 73 struct xfs_inode *ip; 75 - struct failure_info *notify = data; 74 + struct xfs_failure_info *notify = data; 76 75 int error = 0; 77 76 78 77 if (XFS_RMAP_NON_INODE_OWNER(rec->rm_owner) || 79 78 (rec->rm_flags & (XFS_RMAP_ATTR_FORK | XFS_RMAP_BMBT_BLOCK))) { 80 - xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_ONDISK); 81 - return -EFSCORRUPTED; 79 + notify->want_shutdown = true; 80 + return 0; 82 81 } 83 82 84 83 /* Get files that incore, filter out others that are not in use. */ ··· 87 86 /* Continue the rmap query if the inode isn't incore */ 88 87 if (error == -ENODATA) 89 88 return 0; 90 - if (error) 91 - return error; 89 + if (error) { 90 + notify->want_shutdown = true; 91 + return 0; 92 + } 92 93 93 94 error = mf_dax_kill_procs(VFS_I(ip)->i_mapping, 94 95 xfs_failure_pgoff(mp, rec, notify), ··· 107 104 xfs_daddr_t bblen, 108 105 int mf_flags) 109 106 { 107 + struct xfs_failure_info notify = { .mf_flags = mf_flags }; 110 108 struct xfs_trans *tp = NULL; 111 109 struct xfs_btree_cur *cur = NULL; 112 110 struct xfs_buf *agf_bp = NULL; ··· 124 120 for (; agno <= end_agno; agno++) { 125 121 struct xfs_rmap_irec ri_low = { }; 126 122 struct xfs_rmap_irec ri_high; 127 - struct failure_info notify; 128 123 struct xfs_agf *agf; 129 124 xfs_agblock_t agend; 130 125 struct xfs_perag *pag; ··· 164 161 } 165 162 166 163 xfs_trans_cancel(tp); 164 + if (error || notify.want_shutdown) { 165 + xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_ONDISK); 166 + if (!error) 167 + error = -EFSCORRUPTED; 168 + } 167 169 return error; 168 170 } 169 171
+12 -10
fs/xfs/xfs_reflink.c
··· 200 200 if (fbno == NULLAGBLOCK) { 201 201 /* No shared blocks at all. */ 202 202 return 0; 203 - } else if (fbno == agbno) { 203 + } 204 + 205 + if (fbno == agbno) { 204 206 /* 205 207 * The start of this extent is shared. Truncate the 206 208 * mapping at the end of the shared region so that a ··· 212 210 irec->br_blockcount = flen; 213 211 *shared = true; 214 212 return 0; 215 - } else { 216 - /* 217 - * There's a shared extent midway through this extent. 218 - * Truncate the mapping at the start of the shared 219 - * extent so that a subsequent iteration starts at the 220 - * start of the shared region. 221 - */ 222 - irec->br_blockcount = fbno - agbno; 223 - return 0; 224 213 } 214 + 215 + /* 216 + * There's a shared extent midway through this extent. 217 + * Truncate the mapping at the start of the shared 218 + * extent so that a subsequent iteration starts at the 219 + * start of the shared region. 220 + */ 221 + irec->br_blockcount = fbno - agbno; 222 + return 0; 225 223 } 226 224 227 225 int
+2 -2
fs/xfs/xfs_stats.c
··· 74 74 defer_relog += per_cpu_ptr(stats, i)->s.defer_relog; 75 75 } 76 76 77 - len += scnprintf(buf + len, PATH_MAX-len, "xpc %Lu %Lu %Lu\n", 77 + len += scnprintf(buf + len, PATH_MAX-len, "xpc %llu %llu %llu\n", 78 78 xs_xstrat_bytes, xs_write_bytes, xs_read_bytes); 79 79 len += scnprintf(buf + len, PATH_MAX-len, "defer_relog %llu\n", 80 80 defer_relog); ··· 125 125 { 126 126 int j; 127 127 128 - seq_printf(m, "qm"); 128 + seq_puts(m, "qm"); 129 129 for (j = XFSSTAT_START_XQMSTAT; j < XFSSTAT_END_XQMSTAT; j++) 130 130 seq_printf(m, " %u", counter_val(xfsstats.xs_stats, j)); 131 131 seq_putc(m, '\n');
+2 -2
fs/xfs/xfs_trace.h
··· 1170 1170 __entry->ino_res_used = qtrx->qt_ino_res_used; 1171 1171 __entry->icount_delta = qtrx->qt_icount_delta; 1172 1172 ), 1173 - TP_printk("dev %d:%d dquot id 0x%x type %s flags %s" 1173 + TP_printk("dev %d:%d dquot id 0x%x type %s flags %s " 1174 1174 "blk_res %llu bcount_delta %lld delbcnt_delta %lld " 1175 1175 "rtblk_res %llu rtblk_res_used %llu rtbcount_delta %lld delrtb_delta %lld " 1176 1176 "ino_res %llu ino_res_used %llu icount_delta %lld", ··· 1602 1602 __entry->caller_ip = caller_ip; 1603 1603 __entry->flags = flags; 1604 1604 ), 1605 - TP_printk("dev %d:%d ino 0x%llx disize 0x%llx fileoff 0x%llx fsbcount 0x%llx" 1605 + TP_printk("dev %d:%d ino 0x%llx disize 0x%llx fileoff 0x%llx fsbcount 0x%llx " 1606 1606 "flags %s caller %pS", 1607 1607 MAJOR(__entry->dev), MINOR(__entry->dev), 1608 1608 __entry->ino,