diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 12:16:20 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 12:16:20 -0500 |
| commit | 1d32bdafaaa8bcc4c39b41ab9f674887d147f188 (patch) | |
| tree | c1aae09d8b98b033fd4dd85ba3dbf97a25776e90 | |
| parent | 0dc3fd0249a295863900984e02dd4bb89204205b (diff) | |
| parent | bf3964c188d686424ff7b69a45941851b9f437f0 (diff) | |
Merge tag 'xfs-for-linus-v3.14-rc1' of git://oss.sgi.com/xfs/xfs
Pull xfs update from Ben Myers:
"This is primarily bug fixes, many of which you already have. New
stuff includes a series to decouple the in-memory and on-disk log
format, helpers in the area of inode clusters, and i_version handling.
We decided to try to use more topic branches this release, so there
are some merge commits in there on account of that. I'm afraid I
didn't do a good job of putting meaningful comments in the first
couple of merges. Sorry about that. I think I have the hang of it
now.
For 3.14-rc1 there are fixes in the areas of remote attributes,
discard, growfs, memory leaks in recovery, directory v2, quotas, the
MAINTAINERS file, allocation alignment, extent list locking, and in
xfs_bmapi_allocate. There are cleanups in xfs_setsize_buftarg,
removing unused macros, quotas, setattr, and freeing of inode
clusters. The in-memory and on-disk log format have been decoupled, a
common helper to calculate the number of blocks in an inode cluster
has been added, and handling of i_version has been pulled into the
filesystems that use it.
- cleanup in xfs_setsize_buftarg
- removal of remaining unused flags for vop toss/flush/flushinval
- fix for memory corruption in xfs_attrlist_by_handle
- fix for out-of-date comment in xfs_trans_dqlockedjoin
- fix for discard if range length is less than one block
- fix for overrun of agfl buffer using growfs on v4 superblock
filesystems
- pull i_version handling out into the filesystems that use it
- don't leak recovery items on error
- fix for memory leak in xfs_dir2_node_removename
- several cleanups for quotas
- fix bad assertion in xfs_qm_vop_create_dqattach
- cleanup for xfs_setattr_mode, and add xfs_setattr_time
- fix quota assert in xfs_setattr_nonsize
- fix an infinite loop when turning off group/project quota before
user quota
- fix for temporary buffer allocation failure in xfs_dir2_block_to_sf
with large directory block sizes
- fix Dave's email address in MAINTAINERS
- cleanup calculation of freed inode cluster blocks
- fix alignment of initial file allocations to match filesystem
geometry
- decouple in-memory and on-disk log format
- introduce a common helper to calculate the number of filesystem
blocks in an inode cluster
- fixes for extent list locking
- fix for off-by-one in xfs_attr3_rmt_verify
- fix for missing destroy_work_on_stack in xfs_bmapi_allocate"
* tag 'xfs-for-linus-v3.14-rc1' of git://oss.sgi.com/xfs/xfs: (51 commits)
xfs: Calling destroy_work_on_stack() to pair with INIT_WORK_ONSTACK()
xfs: fix off-by-one error in xfs_attr3_rmt_verify
xfs: assert that we hold the ilock for extent map access
xfs: use xfs_ilock_attr_map_shared in xfs_attr_list_int
xfs: use xfs_ilock_attr_map_shared in xfs_attr_get
xfs: use xfs_ilock_data_map_shared in xfs_qm_dqiterate
xfs: use xfs_ilock_data_map_shared in xfs_qm_dqtobp
xfs: take the ilock around xfs_bmapi_read in xfs_zero_remaining_bytes
xfs: reinstate the ilock in xfs_readdir
xfs: add xfs_ilock_attr_map_shared
xfs: rename xfs_ilock_map_shared
xfs: remove xfs_iunlock_map_shared
xfs: no need to lock the inode in xfs_find_handle
xfs: use xfs_icluster_size_fsb in xfs_imap
xfs: use xfs_icluster_size_fsb in xfs_ifree_cluster
xfs: use xfs_icluster_size_fsb in xfs_ialloc_inode_init
xfs: use xfs_icluster_size_fsb in xfs_bulkstat
xfs: introduce a common helper xfs_icluster_size_fsb
xfs: get rid of XFS_IALLOC_BLOCKS macros
xfs: get rid of XFS_INODE_CLUSTER_SIZE macros
...
40 files changed, 614 insertions, 717 deletions
| @@ -202,11 +202,6 @@ int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **de | |||
| 202 | return -EPERM; | 202 | return -EPERM; |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | if ((ia_valid & ATTR_SIZE) && IS_I_VERSION(inode)) { | ||
| 206 | if (attr->ia_size != inode->i_size) | ||
| 207 | inode_inc_iversion(inode); | ||
| 208 | } | ||
| 209 | |||
| 210 | if ((ia_valid & ATTR_MODE)) { | 205 | if ((ia_valid & ATTR_MODE)) { |
| 211 | umode_t amode = attr->ia_mode; | 206 | umode_t amode = attr->ia_mode; |
| 212 | /* Flag setting protected by i_mutex */ | 207 | /* Flag setting protected by i_mutex */ |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index f1a77449d032..471a4f7f4044 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
| @@ -4354,8 +4354,12 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr) | |||
| 4354 | * these flags set. For all other operations the VFS set these flags | 4354 | * these flags set. For all other operations the VFS set these flags |
| 4355 | * explicitly if it wants a timestamp update. | 4355 | * explicitly if it wants a timestamp update. |
| 4356 | */ | 4356 | */ |
| 4357 | if (newsize != oldsize && (!(mask & (ATTR_CTIME | ATTR_MTIME)))) | 4357 | if (newsize != oldsize) { |
| 4358 | inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb); | 4358 | inode_inc_iversion(inode); |
| 4359 | if (!(mask & (ATTR_CTIME | ATTR_MTIME))) | ||
| 4360 | inode->i_ctime = inode->i_mtime = | ||
| 4361 | current_fs_time(inode->i_sb); | ||
| 4362 | } | ||
| 4359 | 4363 | ||
| 4360 | if (newsize > oldsize) { | 4364 | if (newsize > oldsize) { |
| 4361 | truncate_pagecache(inode, newsize); | 4365 | truncate_pagecache(inode, newsize); |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 61d49ff22c81..31fa964742bc 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
| @@ -4586,6 +4586,10 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr) | |||
| 4586 | if (attr->ia_size > sbi->s_bitmap_maxbytes) | 4586 | if (attr->ia_size > sbi->s_bitmap_maxbytes) |
| 4587 | return -EFBIG; | 4587 | return -EFBIG; |
| 4588 | } | 4588 | } |
| 4589 | |||
| 4590 | if (IS_I_VERSION(inode) && attr->ia_size != inode->i_size) | ||
| 4591 | inode_inc_iversion(inode); | ||
| 4592 | |||
| 4589 | if (S_ISREG(inode->i_mode) && | 4593 | if (S_ISREG(inode->i_mode) && |
| 4590 | (attr->ia_size < inode->i_size)) { | 4594 | (attr->ia_size < inode->i_size)) { |
| 4591 | if (ext4_should_order_data(inode)) { | 4595 | if (ext4_should_order_data(inode)) { |
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 71c8c9d2b882..a26739451b53 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c | |||
| @@ -1217,7 +1217,7 @@ __xfs_get_blocks( | |||
| 1217 | lockmode = XFS_ILOCK_EXCL; | 1217 | lockmode = XFS_ILOCK_EXCL; |
| 1218 | xfs_ilock(ip, lockmode); | 1218 | xfs_ilock(ip, lockmode); |
| 1219 | } else { | 1219 | } else { |
| 1220 | lockmode = xfs_ilock_map_shared(ip); | 1220 | lockmode = xfs_ilock_data_map_shared(ip); |
| 1221 | } | 1221 | } |
| 1222 | 1222 | ||
| 1223 | ASSERT(offset <= mp->m_super->s_maxbytes); | 1223 | ASSERT(offset <= mp->m_super->s_maxbytes); |
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index b86127072ac3..01b6a0102fbd 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c | |||
| @@ -164,6 +164,7 @@ xfs_attr_get( | |||
| 164 | { | 164 | { |
| 165 | int error; | 165 | int error; |
| 166 | struct xfs_name xname; | 166 | struct xfs_name xname; |
| 167 | uint lock_mode; | ||
| 167 | 168 | ||
| 168 | XFS_STATS_INC(xs_attr_get); | 169 | XFS_STATS_INC(xs_attr_get); |
| 169 | 170 | ||
| @@ -174,9 +175,9 @@ xfs_attr_get( | |||
| 174 | if (error) | 175 | if (error) |
| 175 | return error; | 176 | return error; |
| 176 | 177 | ||
| 177 | xfs_ilock(ip, XFS_ILOCK_SHARED); | 178 | lock_mode = xfs_ilock_attr_map_shared(ip); |
| 178 | error = xfs_attr_get_int(ip, &xname, value, valuelenp, flags); | 179 | error = xfs_attr_get_int(ip, &xname, value, valuelenp, flags); |
| 179 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | 180 | xfs_iunlock(ip, lock_mode); |
| 180 | return(error); | 181 | return(error); |
| 181 | } | 182 | } |
| 182 | 183 | ||
diff --git a/fs/xfs/xfs_attr_list.c b/fs/xfs/xfs_attr_list.c index 2d174b128153..01db96f60cf0 100644 --- a/fs/xfs/xfs_attr_list.c +++ b/fs/xfs/xfs_attr_list.c | |||
| @@ -507,17 +507,17 @@ xfs_attr_list_int( | |||
| 507 | { | 507 | { |
| 508 | int error; | 508 | int error; |
| 509 | xfs_inode_t *dp = context->dp; | 509 | xfs_inode_t *dp = context->dp; |
| 510 | uint lock_mode; | ||
| 510 | 511 | ||
| 511 | XFS_STATS_INC(xs_attr_list); | 512 | XFS_STATS_INC(xs_attr_list); |
| 512 | 513 | ||
| 513 | if (XFS_FORCED_SHUTDOWN(dp->i_mount)) | 514 | if (XFS_FORCED_SHUTDOWN(dp->i_mount)) |
| 514 | return EIO; | 515 | return EIO; |
| 515 | 516 | ||
| 516 | xfs_ilock(dp, XFS_ILOCK_SHARED); | ||
| 517 | |||
| 518 | /* | 517 | /* |
| 519 | * Decide on what work routines to call based on the inode size. | 518 | * Decide on what work routines to call based on the inode size. |
| 520 | */ | 519 | */ |
| 520 | lock_mode = xfs_ilock_attr_map_shared(dp); | ||
| 521 | if (!xfs_inode_hasattr(dp)) { | 521 | if (!xfs_inode_hasattr(dp)) { |
| 522 | error = 0; | 522 | error = 0; |
| 523 | } else if (dp->i_d.di_aformat == XFS_DINODE_FMT_LOCAL) { | 523 | } else if (dp->i_d.di_aformat == XFS_DINODE_FMT_LOCAL) { |
| @@ -527,9 +527,7 @@ xfs_attr_list_int( | |||
| 527 | } else { | 527 | } else { |
| 528 | error = xfs_attr_node_list(context); | 528 | error = xfs_attr_node_list(context); |
| 529 | } | 529 | } |
