diff options
author | Dave Chinner <david@fromorbit.com> | 2016-11-09 18:29:29 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-11-09 18:29:29 -0500 |
commit | 8f23d318aa746ea0680637a535606637a19073db (patch) | |
tree | fd90df17569f5b11b4a672fdcb4c57a0d51c655a | |
parent | b649c42e25b7d1be86d9dade8674dec3d64138fb (diff) | |
parent | bec9d48d7a303a5bb95c05961ff07ec7eeb59058 (diff) |
Merge branch 'xfs-4.10-libxfs-cleanups' into for-next
-rw-r--r-- | fs/xfs/libxfs/xfs_attr_leaf.h | 2 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.c | 5 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2.h | 5 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2_data.c | 24 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2_priv.h | 1 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_ialloc.c | 5 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_buf.c | 6 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_buf.h | 4 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_log_format.h | 4 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_log_recover.h | 2 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_rtbitmap.c | 1 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_sb.c | 13 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_types.h | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 4 |
14 files changed, 54 insertions, 25 deletions
diff --git a/fs/xfs/libxfs/xfs_attr_leaf.h b/fs/xfs/libxfs/xfs_attr_leaf.h index 4f2aed04f827..8ef420a16f08 100644 --- a/fs/xfs/libxfs/xfs_attr_leaf.h +++ b/fs/xfs/libxfs/xfs_attr_leaf.h | |||
@@ -51,7 +51,7 @@ int xfs_attr_shortform_getvalue(struct xfs_da_args *args); | |||
51 | int xfs_attr_shortform_to_leaf(struct xfs_da_args *args); | 51 | int xfs_attr_shortform_to_leaf(struct xfs_da_args *args); |
52 | int xfs_attr_shortform_remove(struct xfs_da_args *args); | 52 | int xfs_attr_shortform_remove(struct xfs_da_args *args); |
53 | int xfs_attr_shortform_allfit(struct xfs_buf *bp, struct xfs_inode *dp); | 53 | int xfs_attr_shortform_allfit(struct xfs_buf *bp, struct xfs_inode *dp); |
54 | int xfs_attr_shortform_bytesfit(xfs_inode_t *dp, int bytes); | 54 | int xfs_attr_shortform_bytesfit(struct xfs_inode *dp, int bytes); |
55 | void xfs_attr_fork_remove(struct xfs_inode *ip, struct xfs_trans *tp); | 55 | void xfs_attr_fork_remove(struct xfs_inode *ip, struct xfs_trans *tp); |
56 | 56 | ||
57 | /* | 57 | /* |
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index c6eb21940783..71dd6d783710 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c | |||
@@ -4902,8 +4902,11 @@ xfs_bmap_del_extent_delay( | |||
4902 | * sb counters as we might have to borrow some blocks for the | 4902 | * sb counters as we might have to borrow some blocks for the |
4903 | * indirect block accounting. | 4903 | * indirect block accounting. |
4904 | */ | 4904 | */ |
4905 | xfs_trans_reserve_quota_nblks(NULL, ip, -((long)del->br_blockcount), 0, | 4905 | error = xfs_trans_reserve_quota_nblks(NULL, ip, |
4906 | -((long)del->br_blockcount), 0, | ||
4906 | isrt ? XFS_QMOPT_RES_RTBLKS : XFS_QMOPT_RES_REGBLKS); | 4907 | isrt ? XFS_QMOPT_RES_RTBLKS : XFS_QMOPT_RES_REGBLKS); |
4908 | if (error) | ||
4909 | return error; | ||
4907 | ip->i_delayed_blks -= del->br_blockcount; | 4910 | ip->i_delayed_blks -= del->br_blockcount; |
4908 | 4911 | ||
4909 | if (whichfork == XFS_COW_FORK) | 4912 | if (whichfork == XFS_COW_FORK) |
diff --git a/fs/xfs/libxfs/xfs_dir2.h b/fs/xfs/libxfs/xfs_dir2.h index becc926c3e3d..0197590fa7d7 100644 --- a/fs/xfs/libxfs/xfs_dir2.h +++ b/fs/xfs/libxfs/xfs_dir2.h | |||
@@ -157,6 +157,9 @@ extern int xfs_dir2_isleaf(struct xfs_da_args *args, int *r); | |||
157 | extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db, | 157 | extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db, |
158 | struct xfs_buf *bp); | 158 | struct xfs_buf *bp); |
159 | 159 | ||
160 | extern void xfs_dir2_data_freescan_int(struct xfs_da_geometry *geo, | ||
161 | const struct xfs_dir_ops *ops, | ||
162 | struct xfs_dir2_data_hdr *hdr, int *loghead); | ||
160 | extern void xfs_dir2_data_freescan(struct xfs_inode *dp, | 163 | extern void xfs_dir2_data_freescan(struct xfs_inode *dp, |
161 | struct xfs_dir2_data_hdr *hdr, int *loghead); | 164 | struct xfs_dir2_data_hdr *hdr, int *loghead); |
162 | extern void xfs_dir2_data_log_entry(struct xfs_da_args *args, | 165 | extern void xfs_dir2_data_log_entry(struct xfs_da_args *args, |
@@ -177,6 +180,8 @@ extern struct xfs_dir2_data_free *xfs_dir2_data_freefind( | |||
177 | struct xfs_dir2_data_hdr *hdr, struct xfs_dir2_data_free *bf, | 180 | struct xfs_dir2_data_hdr *hdr, struct xfs_dir2_data_free *bf, |
178 | struct xfs_dir2_data_unused *dup); | 181 | struct xfs_dir2_data_unused *dup); |
179 | 182 | ||
183 | extern int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino); | ||
184 | |||
180 | extern const struct xfs_buf_ops xfs_dir3_block_buf_ops; | 185 | extern const struct xfs_buf_ops xfs_dir3_block_buf_ops; |
181 | extern const struct xfs_buf_ops xfs_dir3_leafn_buf_ops; | 186 | extern const struct xfs_buf_ops xfs_dir3_leafn_buf_ops; |
182 | extern const struct xfs_buf_ops xfs_dir3_leaf1_buf_ops; | 187 | extern const struct xfs_buf_ops xfs_dir3_leaf1_buf_ops; |
diff --git a/fs/xfs/libxfs/xfs_dir2_data.c b/fs/xfs/libxfs/xfs_dir2_data.c index 725fc7841fde..cd75ab9f3bf8 100644 --- a/fs/xfs/libxfs/xfs_dir2_data.c +++ b/fs/xfs/libxfs/xfs_dir2_data.c | |||
@@ -505,8 +505,9 @@ xfs_dir2_data_freeremove( | |||
505 | * Given a data block, reconstruct its bestfree map. | 505 | * Given a data block, reconstruct its bestfree map. |
506 | */ | 506 | */ |
507 | void | 507 | void |
508 | xfs_dir2_data_freescan( | 508 | xfs_dir2_data_freescan_int( |
509 | struct xfs_inode *dp, | 509 | struct xfs_da_geometry *geo, |
510 | const struct xfs_dir_ops *ops, | ||
510 | struct xfs_dir2_data_hdr *hdr, | 511 | struct xfs_dir2_data_hdr *hdr, |
511 | int *loghead) | 512 | int *loghead) |
512 | { | 513 | { |
@@ -516,7 +517,6 @@ xfs_dir2_data_freescan( | |||
516 | struct xfs_dir2_data_free *bf; | 517 | struct xfs_dir2_data_free *bf; |
517 | char *endp; /* end of block's data */ | 518 | char *endp; /* end of block's data */ |
518 | char *p; /* current entry pointer */ | 519 | char *p; /* current entry pointer */ |
519 | struct xfs_da_geometry *geo = dp->i_mount->m_dir_geo; | ||
520 | 520 | ||
521 | ASSERT(hdr->magic == cpu_to_be32(XFS_DIR2_DATA_MAGIC) || | 521 | ASSERT(hdr->magic == cpu_to_be32(XFS_DIR2_DATA_MAGIC) || |
522 | hdr->magic == cpu_to_be32(XFS_DIR3_DATA_MAGIC) || | 522 | hdr->magic == cpu_to_be32(XFS_DIR3_DATA_MAGIC) || |
@@ -526,13 +526,13 @@ xfs_dir2_data_freescan( | |||
526 | /* | 526 | /* |
527 | * Start by clearing the table. | 527 | * Start by clearing the table. |
528 | */ | 528 | */ |
529 | bf = dp->d_ops->data_bestfree_p(hdr); | 529 | bf = ops->data_bestfree_p(hdr); |
530 | memset(bf, 0, sizeof(*bf) * XFS_DIR2_DATA_FD_COUNT); | 530 | memset(bf, 0, sizeof(*bf) * XFS_DIR2_DATA_FD_COUNT); |
531 | *loghead = 1; | 531 | *loghead = 1; |
532 | /* | 532 | /* |
533 | * Set up pointers. | 533 | * Set up pointers. |
534 | */ | 534 | */ |
535 | p = (char *)dp->d_ops->data_entry_p(hdr); | 535 | p = (char *)ops->data_entry_p(hdr); |
536 | if (hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || | 536 | if (hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || |
537 | hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)) { | 537 | hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)) { |
538 | btp = xfs_dir2_block_tail_p(geo, hdr); | 538 | btp = xfs_dir2_block_tail_p(geo, hdr); |
@@ -559,12 +559,22 @@ xfs_dir2_data_freescan( | |||
559 | else { | 559 | else { |
560 | dep = (xfs_dir2_data_entry_t *)p; | 560 | dep = (xfs_dir2_data_entry_t *)p; |
561 | ASSERT((char *)dep - (char *)hdr == | 561 | ASSERT((char *)dep - (char *)hdr == |
562 | be16_to_cpu(*dp->d_ops->data_entry_tag_p(dep))); | 562 | be16_to_cpu(*ops->data_entry_tag_p(dep))); |
563 | p += dp->d_ops->data_entsize(dep->namelen); | 563 | p += ops->data_entsize(dep->namelen); |
564 | } | 564 | } |
565 | } | 565 | } |
566 | } | 566 | } |
567 | 567 | ||
568 | void | ||
569 | xfs_dir2_data_freescan( | ||
570 | struct xfs_inode *dp, | ||
571 | struct xfs_dir2_data_hdr *hdr, | ||
572 | int *loghead) | ||
573 | { | ||
574 | return xfs_dir2_data_freescan_int(dp->i_mount->m_dir_geo, dp->d_ops, | ||
575 | hdr, loghead); | ||
576 | } | ||
577 | |||
568 | /* | 578 | /* |
569 | * Initialize a data block at the given block number in the directory. | 579 | * Initialize a data block at the given block number in the directory. |
570 | * Give back the buffer for the created block. | 580 | * Give back the buffer for the created block. |
diff --git a/fs/xfs/libxfs/xfs_dir2_priv.h b/fs/xfs/libxfs/xfs_dir2_priv.h index ef9f6ead96a4..d04547fcf274 100644 --- a/fs/xfs/libxfs/xfs_dir2_priv.h +++ b/fs/xfs/libxfs/xfs_dir2_priv.h | |||
@@ -21,7 +21,6 @@ | |||
21 | struct dir_context; | 21 | struct dir_context; |
22 | 22 | ||
23 | /* xfs_dir2.c */ | 23 | /* xfs_dir2.c */ |
24 | extern int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino); | ||
25 | extern int xfs_dir2_grow_inode(struct xfs_da_args *args, int space, | 24 | extern int xfs_dir2_grow_inode(struct xfs_da_args *args, int space, |
26 | xfs_dir2_db_t *dbp); | 25 | xfs_dir2_db_t *dbp); |
27 | extern int xfs_dir_cilookup_result(struct xfs_da_args *args, | 26 | extern int xfs_dir_cilookup_result(struct xfs_da_args *args, |
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c index 51b4e0de1fdc..c507c1b17ca1 100644 --- a/fs/xfs/libxfs/xfs_ialloc.c +++ b/fs/xfs/libxfs/xfs_ialloc.c | |||
@@ -2344,7 +2344,8 @@ xfs_imap( | |||
2344 | 2344 | ||
2345 | imap->im_blkno = XFS_AGB_TO_DADDR(mp, agno, agbno); | 2345 | imap->im_blkno = XFS_AGB_TO_DADDR(mp, agno, agbno); |
2346 | imap->im_len = XFS_FSB_TO_BB(mp, 1); | 2346 | imap->im_len = XFS_FSB_TO_BB(mp, 1); |
2347 | imap->im_boffset = (ushort)(offset << mp->m_sb.sb_inodelog); | 2347 | imap->im_boffset = (unsigned short)(offset << |
2348 | mp->m_sb.sb_inodelog); | ||
2348 | return 0; | 2349 | return 0; |
2349 | } | 2350 | } |
2350 | 2351 | ||
@@ -2372,7 +2373,7 @@ out_map: | |||
2372 | 2373 | ||
2373 | imap->im_blkno = XFS_AGB_TO_DADDR(mp, agno, cluster_agbno); | 2374 | imap->im_blkno = XFS_AGB_TO_DADDR(mp, agno, cluster_agbno); |
2374 | imap->im_len = XFS_FSB_TO_BB(mp, blks_per_cluster); | 2375 | imap->im_len = XFS_FSB_TO_BB(mp, blks_per_cluster); |
2375 | imap->im_boffset = (ushort)(offset << mp->m_sb.sb_inodelog); | 2376 | imap->im_boffset = (unsigned short)(offset << mp->m_sb.sb_inodelog); |
2376 | 2377 | ||
2377 | /* | 2378 | /* |
2378 | * If the inode number maps to a block outside the bounds | 2379 | * If the inode number maps to a block outside the bounds |
diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c index 134424fac434..54817f82212c 100644 --- a/fs/xfs/libxfs/xfs_inode_buf.c +++ b/fs/xfs/libxfs/xfs_inode_buf.c | |||
@@ -383,7 +383,7 @@ xfs_log_dinode_to_disk( | |||
383 | static bool | 383 | static bool |
384 | xfs_dinode_verify( | 384 | xfs_dinode_verify( |
385 | struct xfs_mount *mp, | 385 | struct xfs_mount *mp, |
386 | struct xfs_inode *ip, | 386 | xfs_ino_t ino, |
387 | struct xfs_dinode *dip) | 387 | struct xfs_dinode *dip) |
388 | { | 388 | { |
389 | uint16_t flags; | 389 | uint16_t flags; |
@@ -401,7 +401,7 @@ xfs_dinode_verify( | |||
401 | if (!xfs_verify_cksum((char *)dip, mp->m_sb.sb_inodesize, | 401 | if (!xfs_verify_cksum((char *)dip, mp->m_sb.sb_inodesize, |
402 | XFS_DINODE_CRC_OFF)) | 402 | XFS_DINODE_CRC_OFF)) |
403 | return false; | 403 | return false; |
404 | if (be64_to_cpu(dip->di_ino) != ip->i_ino) | 404 | if (be64_to_cpu(dip->di_ino) != ino) |
405 | return false; | 405 | return false; |
406 | if (!uuid_equal(&dip->di_uuid, &mp->m_sb.sb_meta_uuid)) | 406 | if (!uuid_equal(&dip->di_uuid, &mp->m_sb.sb_meta_uuid)) |
407 | return false; | 407 | return false; |
@@ -493,7 +493,7 @@ xfs_iread( | |||
493 | return error; | 493 | return error; |
494 | 494 | ||
495 | /* even unallocated inodes are verified */ | 495 | /* even unallocated inodes are verified */ |
496 | if (!xfs_dinode_verify(mp, ip, dip)) { | 496 | if (!xfs_dinode_verify(mp, ip->i_ino, dip)) { |
497 | xfs_alert(mp, "%s: validation failed for inode %lld failed", | 497 | xfs_alert(mp, "%s: validation failed for inode %lld failed", |
498 | __func__, ip->i_ino); | 498 | __func__, ip->i_ino); |
499 | 499 | ||
diff --git a/fs/xfs/libxfs/xfs_inode_buf.h b/fs/xfs/libxfs/xfs_inode_buf.h index 3cfe12a4f58a..6848a0afbce7 100644 --- a/fs/xfs/libxfs/xfs_inode_buf.h +++ b/fs/xfs/libxfs/xfs_inode_buf.h | |||
@@ -58,8 +58,8 @@ struct xfs_icdinode { | |||
58 | */ | 58 | */ |
59 | struct xfs_imap { | 59 | struct xfs_imap { |
60 | xfs_daddr_t im_blkno; /* starting BB of inode chunk */ | 60 | xfs_daddr_t im_blkno; /* starting BB of inode chunk */ |
61 | ushort im_len; /* length in BBs of inode chunk */ | 61 | unsigned short im_len; /* length in BBs of inode chunk */ |
62 | ushort im_boffset; /* inode offset in block in bytes */ | 62 | unsigned short im_boffset; /* inode offset in block in bytes */ |
63 | }; | 63 | }; |
64 | 64 | ||
65 | int xfs_imap_to_bp(struct xfs_mount *, struct xfs_trans *, | 65 | int xfs_imap_to_bp(struct xfs_mount *, struct xfs_trans *, |
diff --git a/fs/xfs/libxfs/xfs_log_format.h b/fs/xfs/libxfs/xfs_log_format.h index 083cdd6d6c28..7ae571f8e34a 100644 --- a/fs/xfs/libxfs/xfs_log_format.h +++ b/fs/xfs/libxfs/xfs_log_format.h | |||
@@ -481,8 +481,8 @@ static inline uint xfs_log_dinode_size(int version) | |||
481 | typedef struct xfs_buf_log_format { | 481 | typedef struct xfs_buf_log_format { |
482 | unsigned short blf_type; /* buf log item type indicator */ | 482 | unsigned short blf_type; /* buf log item type indicator */ |
483 | unsigned short blf_size; /* size of this item */ | 483 | unsigned short blf_size; /* size of this item */ |
484 | ushort blf_flags; /* misc state */ | 484 | unsigned short blf_flags; /* misc state */ |
485 | ushort blf_len; /* number of blocks in this buf */ | 485 | unsigned short blf_len; /* number of blocks in this buf */ |
486 | __int64_t blf_blkno; /* starting blkno of this buf */ | 486 | __int64_t blf_blkno; /* starting blkno of this buf */ |
487 | unsigned int blf_map_size; /* used size of data bitmap in words */ | 487 | unsigned int blf_map_size; /* used size of data bitmap in words */ |
488 | unsigned int blf_data_map[XFS_BLF_DATAMAP_SIZE]; /* dirty bitmap */ | 488 | unsigned int blf_data_map[XFS_BLF_DATAMAP_SIZE]; /* dirty bitmap */ |
diff --git a/fs/xfs/libxfs/xfs_log_recover.h b/fs/xfs/libxfs/xfs_log_recover.h index 8e385f91d660..d9f65e2d5cc8 100644 --- a/fs/xfs/libxfs/xfs_log_recover.h +++ b/fs/xfs/libxfs/xfs_log_recover.h | |||
@@ -52,7 +52,7 @@ typedef struct xlog_recover { | |||
52 | struct list_head r_itemq; /* q for items */ | 52 | struct list_head r_itemq; /* q for items */ |
53 | } xlog_recover_t; | 53 | } xlog_recover_t; |
54 | 54 | ||
55 | #define ITEM_TYPE(i) (*(ushort *)(i)->ri_buf[0].i_addr) | 55 | #define ITEM_TYPE(i) (*(unsigned short *)(i)->ri_buf[0].i_addr) |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * This is the number of entries in the l_buf_cancel_table used during | 58 | * This is the number of entries in the l_buf_cancel_table used during |
diff --git a/fs/xfs/libxfs/xfs_rtbitmap.c b/fs/xfs/libxfs/xfs_rtbitmap.c index e2e1106c9fad..ea45584a9913 100644 --- a/fs/xfs/libxfs/xfs_rtbitmap.c +++ b/fs/xfs/libxfs/xfs_rtbitmap.c | |||
@@ -1016,4 +1016,3 @@ xfs_rtfree_extent( | |||
1016 | } | 1016 | } |
1017 | return 0; | 1017 | return 0; |
1018 | } | 1018 | } |
1019 | |||
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c index a70aec910626..2580262e4ea0 100644 --- a/fs/xfs/libxfs/xfs_sb.c +++ b/fs/xfs/libxfs/xfs_sb.c | |||
@@ -262,6 +262,12 @@ xfs_mount_validate_sb( | |||
262 | return -EFSCORRUPTED; | 262 | return -EFSCORRUPTED; |
263 | } | 263 | } |
264 | 264 | ||
265 | if (xfs_sb_version_hascrc(&mp->m_sb) && | ||
266 | sbp->sb_blocksize < XFS_MIN_CRC_BLOCKSIZE) { | ||
267 | xfs_notice(mp, "v5 SB sanity check failed"); | ||
268 | return -EFSCORRUPTED; | ||
269 | } | ||
270 | |||
265 | /* | 271 | /* |
266 | * Until this is fixed only page-sized or smaller data blocks work. | 272 | * Until this is fixed only page-sized or smaller data blocks work. |
267 | */ | 273 | */ |
@@ -338,13 +344,16 @@ xfs_sb_quota_from_disk(struct xfs_sb *sbp) | |||
338 | XFS_PQUOTA_CHKD : XFS_GQUOTA_CHKD; | 344 | XFS_PQUOTA_CHKD : XFS_GQUOTA_CHKD; |
339 | sbp->sb_qflags &= ~(XFS_OQUOTA_ENFD | XFS_OQUOTA_CHKD); | 345 | sbp->sb_qflags &= ~(XFS_OQUOTA_ENFD | XFS_OQUOTA_CHKD); |
340 | 346 | ||
341 | if (sbp->sb_qflags & XFS_PQUOTA_ACCT) { | 347 | if (sbp->sb_qflags & XFS_PQUOTA_ACCT && |
348 | sbp->sb_gquotino != NULLFSINO) { | ||
342 | /* | 349 | /* |
343 | * In older version of superblock, on-disk superblock only | 350 | * In older version of superblock, on-disk superblock only |
344 | * has sb_gquotino, and in-core superblock has both sb_gquotino | 351 | * has sb_gquotino, and in-core superblock has both sb_gquotino |
345 | * and sb_pquotino. But, only one of them is supported at any | 352 | * and sb_pquotino. But, only one of them is supported at any |
346 | * point of time. So, if PQUOTA is set in disk superblock, | 353 | * point of time. So, if PQUOTA is set in disk superblock, |
347 | * copy over sb_gquotino to sb_pquotino. | 354 | * copy over sb_gquotino to sb_pquotino. The NULLFSINO test |
355 | * above is to make sure we don't do this twice and wipe them | ||
356 | * both out! | ||
348 | */ | 357 | */ |
349 | sbp->sb_pquotino = sbp->sb_gquotino; | 358 | sbp->sb_pquotino = sbp->sb_gquotino; |
350 | sbp->sb_gquotino = NULLFSINO; | 359 | sbp->sb_gquotino = NULLFSINO; |
diff --git a/fs/xfs/libxfs/xfs_types.h b/fs/xfs/libxfs/xfs_types.h index 8d74870468c2..cf044c0f4d41 100644 --- a/fs/xfs/libxfs/xfs_types.h +++ b/fs/xfs/libxfs/xfs_types.h | |||
@@ -75,11 +75,14 @@ typedef __int64_t xfs_sfiloff_t; /* signed block number in a file */ | |||
75 | * Minimum and maximum blocksize and sectorsize. | 75 | * Minimum and maximum blocksize and sectorsize. |
76 | * The blocksize upper limit is pretty much arbitrary. | 76 | * The blocksize upper limit is pretty much arbitrary. |
77 | * The sectorsize upper limit is due to sizeof(sb_sectsize). | 77 | * The sectorsize upper limit is due to sizeof(sb_sectsize). |
78 | * CRC enable filesystems use 512 byte inodes, meaning 512 byte block sizes | ||
79 | * cannot be used. | ||
78 | */ | 80 | */ |
79 | #define XFS_MIN_BLOCKSIZE_LOG 9 /* i.e. 512 bytes */ | 81 | #define XFS_MIN_BLOCKSIZE_LOG 9 /* i.e. 512 bytes */ |
80 | #define XFS_MAX_BLOCKSIZE_LOG 16 /* i.e. 65536 bytes */ | 82 | #define XFS_MAX_BLOCKSIZE_LOG 16 /* i.e. 65536 bytes */ |
81 | #define XFS_MIN_BLOCKSIZE (1 << XFS_MIN_BLOCKSIZE_LOG) | 83 | #define XFS_MIN_BLOCKSIZE (1 << XFS_MIN_BLOCKSIZE_LOG) |
82 | #define XFS_MAX_BLOCKSIZE (1 << XFS_MAX_BLOCKSIZE_LOG) | 84 | #define XFS_MAX_BLOCKSIZE (1 << XFS_MAX_BLOCKSIZE_LOG) |
85 | #define XFS_MIN_CRC_BLOCKSIZE (1 << (XFS_MIN_BLOCKSIZE_LOG + 1)) | ||
83 | #define XFS_MIN_SECTORSIZE_LOG 9 /* i.e. 512 bytes */ | 86 | #define XFS_MIN_SECTORSIZE_LOG 9 /* i.e. 512 bytes */ |
84 | #define XFS_MAX_SECTORSIZE_LOG 15 /* i.e. 32768 bytes */ | 87 | #define XFS_MAX_SECTORSIZE_LOG 15 /* i.e. 32768 bytes */ |
85 | #define XFS_MIN_SECTORSIZE (1 << XFS_MIN_SECTORSIZE_LOG) | 88 | #define XFS_MIN_SECTORSIZE (1 << XFS_MIN_SECTORSIZE_LOG) |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 9b3d7c76915d..cf754bcbcb1c 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -2025,7 +2025,7 @@ xlog_peek_buffer_cancelled( | |||
2025 | struct xlog *log, | 2025 | struct xlog *log, |
2026 | xfs_daddr_t blkno, | 2026 | xfs_daddr_t blkno, |
2027 | uint len, | 2027 | uint len, |
2028 | ushort flags) | 2028 | unsigned short flags) |
2029 | { | 2029 | { |
2030 | struct list_head *bucket; | 2030 | struct list_head *bucket; |
2031 | struct xfs_buf_cancel *bcp; | 2031 | struct xfs_buf_cancel *bcp; |
@@ -2065,7 +2065,7 @@ xlog_check_buffer_cancelled( | |||
2065 | struct xlog *log, | 2065 | struct xlog *log, |
2066 | xfs_daddr_t blkno, | 2066 | xfs_daddr_t blkno, |
2067 | uint len, | 2067 | uint len, |
2068 | ushort flags) | 2068 | unsigned short flags) |
2069 | { | 2069 | { |
2070 | struct xfs_buf_cancel *bcp; | 2070 | struct xfs_buf_cancel *bcp; |
2071 | 2071 | ||