mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
Merge branch 'xfs-fixes-for-3.15' into for-next
This commit is contained in:
commit
b678573e29
@ -281,7 +281,7 @@ xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
if (!acl)
|
||||
goto set_acl;
|
||||
|
||||
error = -EINVAL;
|
||||
error = -E2BIG;
|
||||
if (acl->a_count > XFS_ACL_MAX_ENTRIES(XFS_M(inode->i_sb)))
|
||||
return error;
|
||||
|
||||
|
@ -796,20 +796,6 @@ xfs_buf_item_init(
|
||||
bip->bli_formats[i].blf_map_size = map_size;
|
||||
}
|
||||
|
||||
#ifdef XFS_TRANS_DEBUG
|
||||
/*
|
||||
* Allocate the arrays for tracking what needs to be logged
|
||||
* and what our callers request to be logged. bli_orig
|
||||
* holds a copy of the original, clean buffer for comparison
|
||||
* against, and bli_logged keeps a 1 bit flag per byte in
|
||||
* the buffer to indicate which bytes the callers have asked
|
||||
* to have logged.
|
||||
*/
|
||||
bip->bli_orig = kmem_alloc(BBTOB(bp->b_length), KM_SLEEP);
|
||||
memcpy(bip->bli_orig, bp->b_addr, BBTOB(bp->b_length));
|
||||
bip->bli_logged = kmem_zalloc(BBTOB(bp->b_length) / NBBY, KM_SLEEP);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Put the buf item into the list of items attached to the
|
||||
* buffer at the front.
|
||||
@ -957,11 +943,6 @@ STATIC void
|
||||
xfs_buf_item_free(
|
||||
xfs_buf_log_item_t *bip)
|
||||
{
|
||||
#ifdef XFS_TRANS_DEBUG
|
||||
kmem_free(bip->bli_orig);
|
||||
kmem_free(bip->bli_logged);
|
||||
#endif /* XFS_TRANS_DEBUG */
|
||||
|
||||
xfs_buf_item_free_format(bip);
|
||||
kmem_zone_free(xfs_buf_item_zone, bip);
|
||||
}
|
||||
|
@ -615,7 +615,7 @@ xfs_qm_dqread(
|
||||
|
||||
if (flags & XFS_QMOPT_DQALLOC) {
|
||||
tp = xfs_trans_alloc(mp, XFS_TRANS_QM_DQALLOC);
|
||||
error = xfs_trans_reserve(tp, &M_RES(mp)->tr_attrsetm,
|
||||
error = xfs_trans_reserve(tp, &M_RES(mp)->tr_qm_dqalloc,
|
||||
XFS_QM_DQALLOC_SPACE_RES(mp), 0);
|
||||
if (error)
|
||||
goto error1;
|
||||
|
@ -175,7 +175,7 @@ void xlog_iodone(struct xfs_buf *);
|
||||
struct xlog_ticket *xfs_log_ticket_get(struct xlog_ticket *ticket);
|
||||
void xfs_log_ticket_put(struct xlog_ticket *ticket);
|
||||
|
||||
int xfs_log_commit_cil(struct xfs_mount *mp, struct xfs_trans *tp,
|
||||
void xfs_log_commit_cil(struct xfs_mount *mp, struct xfs_trans *tp,
|
||||
xfs_lsn_t *commit_lsn, int flags);
|
||||
bool xfs_log_item_in_current_chkpt(struct xfs_log_item *lip);
|
||||
|
||||
|
@ -721,7 +721,7 @@ xlog_cil_empty(
|
||||
* background commit, returns without it held once background commits are
|
||||
* allowed again.
|
||||
*/
|
||||
int
|
||||
void
|
||||
xfs_log_commit_cil(
|
||||
struct xfs_mount *mp,
|
||||
struct xfs_trans *tp,
|
||||
@ -767,7 +767,6 @@ xfs_log_commit_cil(
|
||||
xlog_cil_push_background(log);
|
||||
|
||||
up_read(&cil->xc_ctx_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -842,7 +842,7 @@ xfs_growfs_rt_alloc(
|
||||
/*
|
||||
* Reserve space & log for one extent added to the file.
|
||||
*/
|
||||
error = xfs_trans_reserve(tp, &M_RES(mp)->tr_growdata,
|
||||
error = xfs_trans_reserve(tp, &M_RES(mp)->tr_growrtalloc,
|
||||
resblks, 0);
|
||||
if (error)
|
||||
goto error_cancel;
|
||||
|
@ -288,6 +288,7 @@ xfs_mount_validate_sb(
|
||||
sbp->sb_inodelog < XFS_DINODE_MIN_LOG ||
|
||||
sbp->sb_inodelog > XFS_DINODE_MAX_LOG ||
|
||||
sbp->sb_inodesize != (1 << sbp->sb_inodelog) ||
|
||||
sbp->sb_inopblock != howmany(sbp->sb_blocksize,sbp->sb_inodesize) ||
|
||||
(sbp->sb_blocklog - sbp->sb_inodelog != sbp->sb_inopblog) ||
|
||||
(sbp->sb_rextsize * sbp->sb_blocksize > XFS_MAX_RTEXTSIZE) ||
|
||||
(sbp->sb_rextsize * sbp->sb_blocksize < XFS_MIN_RTEXTSIZE) ||
|
||||
|
@ -887,12 +887,7 @@ xfs_trans_commit(
|
||||
xfs_trans_apply_sb_deltas(tp);
|
||||
xfs_trans_apply_dquot_deltas(tp);
|
||||
|
||||
error = xfs_log_commit_cil(mp, tp, &commit_lsn, flags);
|
||||
if (error == ENOMEM) {
|
||||
xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR);
|
||||
error = XFS_ERROR(EIO);
|
||||
goto out_unreserve;
|
||||
}
|
||||
xfs_log_commit_cil(mp, tp, &commit_lsn, flags);
|
||||
|
||||
current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
|
||||
xfs_trans_free(tp);
|
||||
@ -902,10 +897,7 @@ xfs_trans_commit(
|
||||
* log out now and wait for it.
|
||||
*/
|
||||
if (sync) {
|
||||
if (!error) {
|
||||
error = _xfs_log_force_lsn(mp, commit_lsn,
|
||||
XFS_LOG_SYNC, NULL);
|
||||
}
|
||||
error = _xfs_log_force_lsn(mp, commit_lsn, XFS_LOG_SYNC, NULL);
|
||||
XFS_STATS_INC(xs_trans_sync);
|
||||
} else {
|
||||
XFS_STATS_INC(xs_trans_async);
|
||||
|
@ -644,15 +644,14 @@ xfs_calc_qm_setqlim_reservation(
|
||||
|
||||
/*
|
||||
* Allocating quota on disk if needed.
|
||||
* the write transaction log space: M_RES(mp)->tr_write.tr_logres
|
||||
* the write transaction log space for quota file extent allocation
|
||||
* the unit of quota allocation: one system block size
|
||||
*/
|
||||
STATIC uint
|
||||
xfs_calc_qm_dqalloc_reservation(
|
||||
struct xfs_mount *mp)
|
||||
{
|
||||
ASSERT(M_RES(mp)->tr_write.tr_logres);
|
||||
return M_RES(mp)->tr_write.tr_logres +
|
||||
return xfs_calc_write_reservation(mp) +
|
||||
xfs_calc_buf_res(1,
|
||||
XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB) - 1);
|
||||
}
|
||||
@ -784,7 +783,6 @@ xfs_trans_resv_calc(
|
||||
/* The following transaction are logged in logical format */
|
||||
resp->tr_ichange.tr_logres = xfs_calc_ichange_reservation(mp);
|
||||
resp->tr_growdata.tr_logres = xfs_calc_growdata_reservation(mp);
|
||||
resp->tr_swrite.tr_logres = xfs_calc_swrite_reservation(mp);
|
||||
resp->tr_fsyncts.tr_logres = xfs_calc_swrite_reservation(mp);
|
||||
resp->tr_writeid.tr_logres = xfs_calc_writeid_reservation(mp);
|
||||
resp->tr_attrsetrt.tr_logres = xfs_calc_attrsetrt_reservation(mp);
|
||||
|
@ -42,7 +42,6 @@ struct xfs_trans_resv {
|
||||
struct xfs_trans_res tr_ifree; /* inode free trans */
|
||||
struct xfs_trans_res tr_ichange; /* inode update trans */
|
||||
struct xfs_trans_res tr_growdata; /* fs data section grow trans */
|
||||
struct xfs_trans_res tr_swrite; /* sync write inode trans */
|
||||
struct xfs_trans_res tr_addafork; /* add inode attr fork trans */
|
||||
struct xfs_trans_res tr_writeid; /* write setuid/setgid file */
|
||||
struct xfs_trans_res tr_attrinval; /* attr fork buffer
|
||||
|
Loading…
Reference in New Issue
Block a user