Re: [RFC PATCH 5/8] debugfs: 64bit inode support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Oct 27, 2017, at 11:22 AM, Artem Blagodarenko <artem.blagodarenko@xxxxxxxxx> wrote:
> 
> New dirdata type EXT2_DIRENT_INODE is added.
> 
> Signed-off-by: Artem Blagodarenko <artem.blagodarenko@xxxxxxxxx>
> ---
> debugfs/ls.c         | 5 ++++-
> lib/ext2fs/ext2_fs.h | 1 +
> 2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/debugfs/ls.c b/debugfs/ls.c
> index 2216d456..0c575328 100644
> --- a/debugfs/ls.c
> +++ b/debugfs/ls.c
> @@ -64,9 +64,12 @@ static void list_dirdata(struct list_dir_struct *ls,
> 
> 		dlen = data[0];
> 
> -		if (dirdata_mask == EXT2_DIRENT_LUFID) {
> +		if (dirdata_mask == EXT2_DIRENT_INODE)
> +			fprintf(ls->f, "Inode high part:%04\n",*(__u32*)(data +1));

This should be brief, or the "ls" output will be very wide, and having multiple
words makes parsing this output for testing complex.  Something like:

        fprintf(ls->f, "ino64:%04"

but it might just be better to include the high 32 bits into the inode number
that is already printed?

> +		else if (dirdata_mask == EXT2_DIRENT_LUFID) {
> 			struct lu_fid *fid = (struct lu_fid *)(data + 1);
> 
> +			fprintf(ls->f, "lufind dirdata\n");

(typo) s/lufind/lufid/

Similarly, this should be shorter, like "FID:"DFID,

> diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
> index 6a882789..b9773814 100644
> --- a/lib/ext2fs/ext2_fs.h
> +++ b/lib/ext2fs/ext2_fs.h
> @@ -1041,6 +1041,7 @@ struct ext2_dir_entry_tail {
> /* lu_fid size and NUL char */
> #define EXT2_DIRENT_LUFID_SIZE		(17 + 1)
> #define EXT2_DIRENT_LUFID		0x10
> +#define EXT2_DIRENT_INODE		0x20
> 
> /*
>  * Constants for ext4's extended time encoding
> --
> 2.13.5 (Apple Git-94)
> 


Cheers, Andreas





Attachment: signature.asc
Description: Message signed with OpenPGP


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux