diff options
author | Dave Chinner <david@fromorbit.com> | 2014-02-19 23:16:09 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-02-19 23:16:09 -0500 |
commit | b678573e29749e7fe884c3a8e61c1cf1e1093987 (patch) | |
tree | 32b02db96ee1f20d98f414e91325afa8d08ebd9c /fs/xfs | |
parent | 5ef11eb0700f806c4671ba33e5befa784a2f70ef (diff) | |
parent | 492185ef1dd261768203a6c3accfd445cde8c503 (diff) |
Merge branch 'xfs-fixes-for-3.15' into for-next
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_acl.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_buf_item.c | 19 | ||||
-rw-r--r-- | fs/xfs/xfs_dquot.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_log.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_log_cil.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_sb.c | 1 | ||||
-rw-r--r-- | fs/xfs/xfs_trans.c | 12 | ||||
-rw-r--r-- | fs/xfs/xfs_trans_resv.c | 6 | ||||
-rw-r--r-- | fs/xfs/xfs_trans_resv.h | 1 |
10 files changed, 10 insertions, 40 deletions
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c index 0ecec1896f25..6888ad886ff6 100644 --- a/fs/xfs/xfs_acl.c +++ b/fs/xfs/xfs_acl.c | |||
@@ -281,7 +281,7 @@ xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
281 | if (!acl) | 281 | if (!acl) |
282 | goto set_acl; | 282 | goto set_acl; |
283 | 283 | ||
284 | error = -EINVAL; | 284 | error = -E2BIG; |
285 | if (acl->a_count > XFS_ACL_MAX_ENTRIES(XFS_M(inode->i_sb))) | 285 | if (acl->a_count > XFS_ACL_MAX_ENTRIES(XFS_M(inode->i_sb))) |
286 | return error; | 286 | return error; |
287 | 287 | ||
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index 33149113e333..8752821443be 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c | |||
@@ -796,20 +796,6 @@ xfs_buf_item_init( | |||
796 | bip->bli_formats[i].blf_map_size = map_size; | 796 | bip->bli_formats[i].blf_map_size = map_size; |
797 | } | 797 | } |
798 | 798 | ||
799 | #ifdef XFS_TRANS_DEBUG | ||
800 | /* | ||
801 | * Allocate the arrays for tracking what needs to be logged | ||
802 | * and what our callers request to be logged. bli_orig | ||
803 | * holds a copy of the original, clean buffer for comparison | ||
804 | * against, and bli_logged keeps a 1 bit flag per byte in | ||
805 | * the buffer to indicate which bytes the callers have asked | ||
806 | * to have logged. | ||
807 | */ | ||
808 | bip->bli_orig = kmem_alloc(BBTOB(bp->b_length), KM_SLEEP); | ||
809 | memcpy(bip->bli_orig, bp->b_addr, BBTOB(bp->b_length)); | ||
810 | bip->bli_logged = kmem_zalloc(BBTOB(bp->b_length) / NBBY, KM_SLEEP); | ||
811 | #endif | ||
812 | |||
813 | /* | 799 | /* |
814 | * Put the buf item into the list of items attached to the | 800 | * Put the buf item into the list of items attached to the |
815 | * buffer at the front. | 801 | * buffer at the front. |
@@ -957,11 +943,6 @@ STATIC void | |||
957 | xfs_buf_item_free( | 943 | xfs_buf_item_free( |
958 | xfs_buf_log_item_t *bip) | 944 | xfs_buf_log_item_t *bip) |
959 | { | 945 | { |
960 | #ifdef XFS_TRANS_DEBUG | ||
961 | kmem_free(bip->bli_orig); | ||
962 | kmem_free(bip->bli_logged); | ||
963 | #endif /* XFS_TRANS_DEBUG */ | ||
964 | |||
965 | xfs_buf_item_free_format(bip); | 946 | xfs_buf_item_free_format(bip); |
966 | kmem_zone_free(xfs_buf_item_zone, bip); | 947 | kmem_zone_free(xfs_buf_item_zone, bip); |
967 | } | 948 | } |
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index 7aeb4c895b32..868b19f096bf 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c | |||
@@ -615,7 +615,7 @@ xfs_qm_dqread( | |||
615 | 615 | ||
616 | if (flags & XFS_QMOPT_DQALLOC) { | 616 | if (flags & XFS_QMOPT_DQALLOC) { |
617 | tp = xfs_trans_alloc(mp, XFS_TRANS_QM_DQALLOC); | 617 | tp = xfs_trans_alloc(mp, XFS_TRANS_QM_DQALLOC); |
618 | error = xfs_trans_reserve(tp, &M_RES(mp)->tr_attrsetm, | 618 | error = xfs_trans_reserve(tp, &M_RES(mp)->tr_qm_dqalloc, |
619 | XFS_QM_DQALLOC_SPACE_RES(mp), 0); | 619 | XFS_QM_DQALLOC_SPACE_RES(mp), 0); |
620 | if (error) | 620 | if (error) |
621 | goto error1; | 621 | goto error1; |
diff --git a/fs/xfs/xfs_log.h b/fs/xfs/xfs_log.h index b0f4ef77fa70..2c4004475e71 100644 --- a/fs/xfs/xfs_log.h +++ b/fs/xfs/xfs_log.h | |||
@@ -175,7 +175,7 @@ void xlog_iodone(struct xfs_buf *); | |||
175 | struct xlog_ticket *xfs_log_ticket_get(struct xlog_ticket *ticket); | 175 | struct xlog_ticket *xfs_log_ticket_get(struct xlog_ticket *ticket); |
176 | void xfs_log_ticket_put(struct xlog_ticket *ticket); | 176 | void xfs_log_ticket_put(struct xlog_ticket *ticket); |
177 | 177 | ||
178 | int xfs_log_commit_cil(struct xfs_mount *mp, struct xfs_trans *tp, | 178 | void xfs_log_commit_cil(struct xfs_mount *mp, struct xfs_trans *tp, |
179 | xfs_lsn_t *commit_lsn, int flags); | 179 | xfs_lsn_t *commit_lsn, int flags); |
180 | bool xfs_log_item_in_current_chkpt(struct xfs_log_item *lip); | 180 | bool xfs_log_item_in_current_chkpt(struct xfs_log_item *lip); |
181 | 181 | ||
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index 4ef6fdbced78..b57a8e08b3d1 100644 --- a/fs/xfs/xfs_log_cil.c +++ b/fs/xfs/xfs_log_cil.c | |||
@@ -721,7 +721,7 @@ xlog_cil_empty( | |||
721 | * background commit, returns without it held once background commits are | 721 | * background commit, returns without it held once background commits are |
722 | * allowed again. | 722 | * allowed again. |
723 | */ | 723 | */ |
724 | int | 724 | void |
725 | xfs_log_commit_cil( | 725 | xfs_log_commit_cil( |
726 | struct xfs_mount *mp, | 726 | struct xfs_mount *mp, |
727 | struct xfs_trans *tp, | 727 | struct xfs_trans *tp, |
@@ -767,7 +767,6 @@ xfs_log_commit_cil( | |||
767 | xlog_cil_push_background(log); | 767 | xlog_cil_push_background(log); |
768 | 768 | ||
769 | up_read(&cil->xc_ctx_lock); | 769 | up_read(&cil->xc_ctx_lock); |
770 | return 0; | ||
771 | } | 770 | } |
772 | 771 | ||
773 | /* | 772 | /* |
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index a6a76b2b6a85..ec5ca65c6211 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c | |||
@@ -842,7 +842,7 @@ xfs_growfs_rt_alloc( | |||
842 | /* | 842 | /* |
843 | * Reserve space & log for one extent added to the file. | 843 | * Reserve space & log for one extent added to the file. |
844 | */ | 844 | */ |
845 | error = xfs_trans_reserve(tp, &M_RES(mp)->tr_growdata, | 845 | error = xfs_trans_reserve(tp, &M_RES(mp)->tr_growrtalloc, |
846 | resblks, 0); | 846 | resblks, 0); |
847 | if (error) | 847 | if (error) |
848 | goto error_cancel; | 848 | goto error_cancel; |
diff --git a/fs/xfs/xfs_sb.c b/fs/xfs/xfs_sb.c index 1e116794bb66..75161a2060fb 100644 --- a/fs/xfs/xfs_sb.c +++ b/fs/xfs/xfs_sb.c | |||
@@ -288,6 +288,7 @@ xfs_mount_validate_sb( | |||
288 | sbp->sb_inodelog < XFS_DINODE_MIN_LOG || | 288 | sbp->sb_inodelog < XFS_DINODE_MIN_LOG || |
289 | sbp->sb_inodelog > XFS_DINODE_MAX_LOG || | 289 | sbp->sb_inodelog > XFS_DINODE_MAX_LOG || |
290 | sbp->sb_inodesize != (1 << sbp->sb_inodelog) || | 290 | sbp->sb_inodesize != (1 << sbp->sb_inodelog) || |
291 | sbp->sb_inopblock != howmany(sbp->sb_blocksize,sbp->sb_inodesize) || | ||
291 | (sbp->sb_blocklog - sbp->sb_inodelog != sbp->sb_inopblog) || | 292 | (sbp->sb_blocklog - sbp->sb_inodelog != sbp->sb_inopblog) || |
292 | (sbp->sb_rextsize * sbp->sb_blocksize > XFS_MAX_RTEXTSIZE) || | 293 | (sbp->sb_rextsize * sbp->sb_blocksize > XFS_MAX_RTEXTSIZE) || |
293 | (sbp->sb_rextsize * sbp->sb_blocksize < XFS_MIN_RTEXTSIZE) || | 294 | (sbp->sb_rextsize * sbp->sb_blocksize < XFS_MIN_RTEXTSIZE) || |
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index c812c5c060de..54a57326d85b 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c | |||
@@ -887,12 +887,7 @@ xfs_trans_commit( | |||
887 | xfs_trans_apply_sb_deltas(tp); | 887 | xfs_trans_apply_sb_deltas(tp); |
888 | xfs_trans_apply_dquot_deltas(tp); | 888 | xfs_trans_apply_dquot_deltas(tp); |
889 | 889 | ||
890 | error = xfs_log_commit_cil(mp, tp, &commit_lsn, flags); | 890 | xfs_log_commit_cil(mp, tp, &commit_lsn, flags); |
891 | if (error == ENOMEM) { | ||
892 | xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR); | ||
893 | error = XFS_ERROR(EIO); | ||
894 | goto out_unreserve; | ||
895 | } | ||
896 | 891 | ||
897 | current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); | 892 | current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); |
898 | xfs_trans_free(tp); | 893 | xfs_trans_free(tp); |
@@ -902,10 +897,7 @@ xfs_trans_commit( | |||
902 | * log out now and wait for it. | 897 | * log out now and wait for it. |
903 | */ | 898 | */ |
904 | if (sync) { | 899 | if (sync) { |
905 | if (!error) { | 900 | error = _xfs_log_force_lsn(mp, commit_lsn, XFS_LOG_SYNC, NULL); |
906 | error = _xfs_log_force_lsn(mp, commit_lsn, | ||
907 | XFS_LOG_SYNC, NULL); | ||
908 | } | ||
909 | XFS_STATS_INC(xs_trans_sync); | 901 | XFS_STATS_INC(xs_trans_sync); |
910 | } else { | 902 | } else { |
911 | XFS_STATS_INC(xs_trans_async); | 903 | XFS_STATS_INC(xs_trans_async); |
diff --git a/fs/xfs/xfs_trans_resv.c b/fs/xfs/xfs_trans_resv.c index 2ffd3e331b49..8515b0449dc8 100644 --- a/fs/xfs/xfs_trans_resv.c +++ b/fs/xfs/xfs_trans_resv.c | |||
@@ -644,15 +644,14 @@ xfs_calc_qm_setqlim_reservation( | |||
644 | 644 | ||
645 | /* | 645 | /* |
646 | * Allocating quota on disk if needed. | 646 | * Allocating quota on disk if needed. |
647 | * the write transaction log space: M_RES(mp)->tr_write.tr_logres | 647 | * the write transaction log space for quota file extent allocation |
648 | * the unit of quota allocation: one system block size | 648 | * the unit of quota allocation: one system block size |
649 | */ | 649 | */ |
650 | STATIC uint | 650 | STATIC uint |
651 | xfs_calc_qm_dqalloc_reservation( | 651 | xfs_calc_qm_dqalloc_reservation( |
652 | struct xfs_mount *mp) | 652 | struct xfs_mount *mp) |
653 | { | 653 | { |
654 | ASSERT(M_RES(mp)->tr_write.tr_logres); | 654 | return xfs_calc_write_reservation(mp) + |
655 | return M_RES(mp)->tr_write.tr_logres + | ||
656 | xfs_calc_buf_res(1, | 655 | xfs_calc_buf_res(1, |
657 | XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB) - 1); | 656 | XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB) - 1); |
658 | } | 657 | } |
@@ -784,7 +783,6 @@ xfs_trans_resv_calc( | |||
784 | /* The following transaction are logged in logical format */ | 783 | /* The following transaction are logged in logical format */ |
785 | resp->tr_ichange.tr_logres = xfs_calc_ichange_reservation(mp); | 784 | resp->tr_ichange.tr_logres = xfs_calc_ichange_reservation(mp); |
786 | resp->tr_growdata.tr_logres = xfs_calc_growdata_reservation(mp); | 785 | resp->tr_growdata.tr_logres = xfs_calc_growdata_reservation(mp); |
787 | resp->tr_swrite.tr_logres = xfs_calc_swrite_reservation(mp); | ||
788 | resp->tr_fsyncts.tr_logres = xfs_calc_swrite_reservation(mp); | 786 | resp->tr_fsyncts.tr_logres = xfs_calc_swrite_reservation(mp); |
789 | resp->tr_writeid.tr_logres = xfs_calc_writeid_reservation(mp); | 787 | resp->tr_writeid.tr_logres = xfs_calc_writeid_reservation(mp); |
790 | resp->tr_attrsetrt.tr_logres = xfs_calc_attrsetrt_reservation(mp); | 788 | resp->tr_attrsetrt.tr_logres = xfs_calc_attrsetrt_reservation(mp); |
diff --git a/fs/xfs/xfs_trans_resv.h b/fs/xfs/xfs_trans_resv.h index de7de9aaad8a..f76c1297b83f 100644 --- a/fs/xfs/xfs_trans_resv.h +++ b/fs/xfs/xfs_trans_resv.h | |||
@@ -42,7 +42,6 @@ struct xfs_trans_resv { | |||
42 | struct xfs_trans_res tr_ifree; /* inode free trans */ | 42 | struct xfs_trans_res tr_ifree; /* inode free trans */ |
43 | struct xfs_trans_res tr_ichange; /* inode update trans */ | 43 | struct xfs_trans_res tr_ichange; /* inode update trans */ |
44 | struct xfs_trans_res tr_growdata; /* fs data section grow trans */ | 44 | struct xfs_trans_res tr_growdata; /* fs data section grow trans */ |
45 | struct xfs_trans_res tr_swrite; /* sync write inode trans */ | ||
46 | struct xfs_trans_res tr_addafork; /* add inode attr fork trans */ | 45 | struct xfs_trans_res tr_addafork; /* add inode attr fork trans */ |
47 | struct xfs_trans_res tr_writeid; /* write setuid/setgid file */ | 46 | struct xfs_trans_res tr_writeid; /* write setuid/setgid file */ |
48 | struct xfs_trans_res tr_attrinval; /* attr fork buffer | 47 | struct xfs_trans_res tr_attrinval; /* attr fork buffer |