diff --git a/utils/src/format.h b/utils/src/format.h index a58d12b6..63cc07be 100644 --- a/utils/src/format.h +++ b/utils/src/format.h @@ -206,8 +206,11 @@ struct scoutfs_file_extent_key { __be64 last_blk_off; __be64 last_blkno; __be64 blocks; + __u8 flags; } __packed; +#define SCOUTFS_FILE_EXTENT_OFFLINE (1 << 0) + /* no value */ struct scoutfs_free_extent_blkno_key { __u8 type; diff --git a/utils/src/print.c b/utils/src/print.c index d9e4cc21..8921d182 100644 --- a/utils/src/print.c +++ b/utils/src/print.c @@ -191,8 +191,10 @@ static void print_file_extent(void *key, int key_len, void *val, int val_len) u64 blk_off = be64_to_cpu(fext->last_blk_off) - blocks + 1; u64 blkno = be64_to_cpu(fext->last_blkno) - blocks + 1; - printf(" extent: ino %llu blk_off %llu blkno %llu blocks %llu\n", - be64_to_cpu(fext->ino), blk_off, blkno, blocks); + printf(" extent: ino %llu blk_off %llu blkno %llu blocks %llu " + "flags %x (%c)\n", + be64_to_cpu(fext->ino), blk_off, blkno, blocks, fext->flags, + (fext->flags & SCOUTFS_FILE_EXTENT_OFFLINE) ? 'O' : '-'); } static void print_free_extent(void *key, int key_len, void *val, int val_len)