[lkml]   [2010]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
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 <>

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 <>
Acked-by: Jeff Mahoney <>
Signed-off-by: Greg Kroah-Hartman <>

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);

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