Displaying 4 results from an estimated 4 matches for "disk_i_size".
2013 Jan 30
0
[PATCH] Btrfs: fix possible stale data exposure
We specifically do not update the disk i_size if there are ordered extents
outstanding for any area between the current disk_i_size and our ordered
extent so that we do not expose stale data. The problem is the check we
have only checks if the ordered extent starts at or after the current
disk_i_size, which doesn''t take into account an ordered extent that starts
before the current disk_i_size and ends past the disk_i_...
2013 Aug 29
0
[PATCH] Btrfs: allow partial ordered extent completion
...ed);
- else
+ if (test_bit(BTRFS_ORDERED_TRUNCATED, &ordered->flags))
+ offset = min(offset,
+ ordered->file_offset +
+ ordered->truncated_len);
+ } else {
offset = ALIGN(offset, BTRFS_I(inode)->root->sectorsize);
-
- spin_lock_irq(&tree->lock);
+ }
disk_i_size = BTRFS_I(inode)->disk_i_size;
/* truncate file */
diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h
index 68844d5..d9a5aa0 100644
--- a/fs/btrfs/ordered-data.h
+++ b/fs/btrfs/ordered-data.h
@@ -69,6 +69,7 @@ struct btrfs_ordered_sum {
* the isize. */
#define BTRFS_...
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...d file. And besides that, if the user does pre-allocation for the file
which is truncated unsuccessfully, after re-mount(umount-mount, not -o remount),
the pre-allocated extent will be dropped.
This patch modified the relative functions of the truncation, and makes the
truncation update i_size and disk_i_size of i-nodes every time we drop the file
extent successfully, and set them to the real value. By this way, we needn''t
add orphan items to guarantee the consistency of the meta-data.
By this patch, it is possible that the file may not be truncated to the size
that the user expects(may be <...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...d, 347 insertions(+), 341 deletions(-)
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 6ad63f1..8a6a2d9 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -173,4 +173,10 @@ static inline void btrfs_i_size_write(struct inode *inode, u64 size)
BTRFS_I(inode)->disk_i_size = size;
}
+/*
+ * This macro documents all the places in the btrfs code where we''re failing
+ * to correctly handle a recoverable error condition.
+ */
+#define btrfs_fixable_bug_on(_err) BUG_ON(_err)
+
#endif
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 396039b.....