mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-07 04:26:29 +00:00
scoutfs-utils: print extent flags
Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user