lkml.org 
[lkml]   [2010]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[062/111] Btrfs: align offsets for btrfs_ordered_update_i_size
2.6.32-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Yan, Zheng <yanzheng@21cn.com>

commit a038fab0cb873c75d6675e2bcffce8a3935bdce7 upstream.

Some callers of btrfs_ordered_update_i_size can now pass in
a NULL for the ordered extent to update against. This makes
sure we properly align the offset they pass in when deciding
how much to bump the on disk i_size.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Acked-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
fs/btrfs/ordered-data.c | 2 ++
1 file changed, 2 insertions(+)

--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -626,6 +626,8 @@ int btrfs_ordered_update_i_size(struct i

if (ordered)
offset = entry_end(ordered);
+ else
+ offset = ALIGN(offset, BTRFS_I(inode)->root->sectorsize);

mutex_lock(&tree->mutex);
disk_i_size = BTRFS_I(inode)->disk_i_size;



\
 
 \ /
  Last update: 2010-08-12 02:39    [W:0.257 / U:3.268 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site