diff options
| author | Dave Chinner <david@fromorbit.com> | 2014-08-03 23:55:27 -0400 |
|---|---|---|
| committer | Dave Chinner <david@fromorbit.com> | 2014-08-03 23:55:27 -0400 |
| commit | 645f9857213476407d8ed1b59619fdff7128d3e6 (patch) | |
| tree | f48e76ffa8b4af8bfa0c64d54ff96d76b61f6f65 /fs/xfs/libxfs | |
| parent | b076d8720d793cde04b75b4941b8774e209649b4 (diff) | |
| parent | 4ef897a27543b513351262881660147366c042a1 (diff) | |
Merge branch 'xfs-misc-fixes-3.17-2' into for-next
Diffstat (limited to 'fs/xfs/libxfs')
| -rw-r--r-- | fs/xfs/libxfs/xfs_sb.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c index 6e93b5ef0a6b..ad525a5623a4 100644 --- a/fs/xfs/libxfs/xfs_sb.c +++ b/fs/xfs/libxfs/xfs_sb.c | |||
| @@ -386,10 +386,11 @@ xfs_sb_quota_from_disk(struct xfs_sb *sbp) | |||
| 386 | } | 386 | } |
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | void | 389 | static void |
| 390 | xfs_sb_from_disk( | 390 | __xfs_sb_from_disk( |
| 391 | struct xfs_sb *to, | 391 | struct xfs_sb *to, |
| 392 | xfs_dsb_t *from) | 392 | xfs_dsb_t *from, |
| 393 | bool convert_xquota) | ||
| 393 | { | 394 | { |
| 394 | to->sb_magicnum = be32_to_cpu(from->sb_magicnum); | 395 | to->sb_magicnum = be32_to_cpu(from->sb_magicnum); |
| 395 | to->sb_blocksize = be32_to_cpu(from->sb_blocksize); | 396 | to->sb_blocksize = be32_to_cpu(from->sb_blocksize); |
| @@ -445,6 +446,17 @@ xfs_sb_from_disk( | |||
| 445 | to->sb_pad = 0; | 446 | to->sb_pad = 0; |
| 446 | to->sb_pquotino = be64_to_cpu(from->sb_pquotino); | 447 | to->sb_pquotino = be64_to_cpu(from->sb_pquotino); |
| 447 | to->sb_lsn = be64_to_cpu(from->sb_lsn); | 448 | to->sb_lsn = be64_to_cpu(from->sb_lsn); |
| 449 | /* Convert on-disk flags to in-memory flags? */ | ||
| 450 | if (convert_xquota) | ||
| 451 | xfs_sb_quota_from_disk(to); | ||
| 452 | } | ||
| 453 | |||
| 454 | void | ||
| 455 | xfs_sb_from_disk( | ||
| 456 | struct xfs_sb *to, | ||
| 457 | xfs_dsb_t *from) | ||
| 458 | { | ||
| 459 | __xfs_sb_from_disk(to, from, true); | ||
| 448 | } | 460 | } |
| 449 | 461 | ||
| 450 | static inline void | 462 | static inline void |
| @@ -577,7 +589,11 @@ xfs_sb_verify( | |||
| 577 | struct xfs_mount *mp = bp->b_target->bt_mount; | 589 | struct xfs_mount *mp = bp->b_target->bt_mount; |
| 578 | struct xfs_sb sb; | 590 | struct xfs_sb sb; |
| 579 | 591 | ||
| 580 | xfs_sb_from_disk(&sb, XFS_BUF_TO_SBP(bp)); | 592 | /* |
| 593 | * Use call variant which doesn't convert quota flags from disk | ||
| 594 | * format, because xfs_mount_validate_sb checks the on-disk flags. | ||
| 595 | */ | ||
| 596 | __xfs_sb_from_disk(&sb, XFS_BUF_TO_SBP(bp), false); | ||
| 581 | 597 | ||
| 582 | /* | 598 | /* |
| 583 | * Only check the in progress field for the primary superblock as | 599 | * Only check the in progress field for the primary superblock as |
