aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents_status.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2013-08-16 21:22:41 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-08-16 21:22:41 -0400
commit3be78c73179c9347bdc0a92b2898063bd2300ff7 (patch)
treeeb4147818a58e3dd80300fd09fc94ad344480231 /fs/ext4/extents_status.c
parentc349179b4808f7c8e1ff1b4dd967c047eefd24bc (diff)
ext4: use unsigned int for es_status values
Don't use an unsigned long long for the es_status flags; this requires that we pass 64-bit values around which is painful on 32-bit systems. Instead pass the extent status flags around using the low 4 bits of an unsigned int, and shift them into place when we are reading or writing es_pblk. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Diffstat (limited to 'fs/ext4/extents_status.c')
-rw-r--r--fs/ext4/extents_status.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 91cb110da1b4..ded2615b63e0 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -263,7 +263,7 @@ void ext4_es_find_delayed_extent_range(struct inode *inode,
263 if (tree->cache_es) { 263 if (tree->cache_es) {
264 es1 = tree->cache_es; 264 es1 = tree->cache_es;
265 if (in_range(lblk, es1->es_lblk, es1->es_len)) { 265 if (in_range(lblk, es1->es_lblk, es1->es_len)) {
266 es_debug("%u cached by [%u/%u) %llu %llx\n", 266 es_debug("%u cached by [%u/%u) %llu %x\n",
267 lblk, es1->es_lblk, es1->es_len, 267 lblk, es1->es_lblk, es1->es_len,
268 ext4_es_pblock(es1), ext4_es_status(es1)); 268 ext4_es_pblock(es1), ext4_es_status(es1));
269 goto out; 269 goto out;
@@ -641,13 +641,13 @@ out:
641 */ 641 */
642int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk, 642int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
643 ext4_lblk_t len, ext4_fsblk_t pblk, 643 ext4_lblk_t len, ext4_fsblk_t pblk,
644 unsigned long long status) 644 unsigned int status)
645{ 645{
646 struct extent_status newes; 646 struct extent_status newes;
647 ext4_lblk_t end = lblk + len - 1; 647 ext4_lblk_t end = lblk + len - 1;
648 int err = 0; 648 int err = 0;
649 649
650 es_debug("add [%u/%u) %llu %llx to extent status tree of inode %lu\n", 650 es_debug("add [%u/%u) %llu %x to extent status tree of inode %lu\n",
651 lblk, len, pblk, status, inode->i_ino); 651 lblk, len, pblk, status, inode->i_ino);
652 652
653 if (!len) 653 if (!len)