lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E34A242A-4FB8-402E-842F-89E61CE56979@dilger.ca>
Date: Fri, 5 Apr 2024 13:28:36 -0600
From: Andreas Dilger <adilger@...ger.ca>
To: Sweet Tea Dorminy <sweettea-kernel@...miny.me>
Cc: Jonathan Corbet <corbet@....net>,
 Kent Overstreet <kent.overstreet@...ux.dev>,
 Brian Foster <bfoster@...hat.com>,
 Chris Mason <clm@...com>,
 Josef Bacik <josef@...icpanda.com>,
 David Sterba <dsterba@...e.com>,
 Jaegeuk Kim <jaegeuk@...nel.org>,
 Chao Yu <chao@...nel.org>,
 Alexander Viro <viro@...iv.linux.org.uk>,
 Christian Brauner <brauner@...nel.org>,
 Jan Kara <jack@...e.cz>,
 Mickaël Salaün <mic@...ikod.net>,
 linux-doc@...r.kernel.org,
 Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
 linux-bcachefs@...r.kernel.org,
 linux-btrfs <linux-btrfs@...r.kernel.org>,
 linux-f2fs-devel@...ts.sourceforge.net,
 linux-fsdevel@...r.kernel.org,
 kernel-team@...a.com
Subject: Re: [PATCH v3 08/13] f2fs: fiemap: add physical length to
 trace_f2fs_fiemap

On Apr 3, 2024, at 1:22 AM, Sweet Tea Dorminy <sweettea-kernel@...miny.me> wrote:
> 
> Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@...miny.me>

With the compat macro in the first patch in the series, IMHO this one
should be merged into the next patch that actually sets the phys_len,
since passing "0" for the phys_len isn't super useful by itself IMHO.

Cheers, Andreas

> ---
> fs/f2fs/data.c              |  6 +++---
> fs/f2fs/inline.c            |  2 +-
> include/trace/events/f2fs.h | 10 +++++++---
> 3 files changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 87f8d828e038..34af1673461b 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -1836,7 +1836,7 @@ static int f2fs_xattr_fiemap(struct inode *inode,
> 
> 		err = fiemap_fill_next_extent(
> 				fieinfo, 0, phys, len, 0, flags);
> -		trace_f2fs_fiemap(inode, 0, phys, len, flags, err);
> +		trace_f2fs_fiemap(inode, 0, phys, len, 0, flags, err);
> 		if (err)
> 			return err;
> 	}
> @@ -1863,7 +1863,7 @@ static int f2fs_xattr_fiemap(struct inode *inode,
> 	if (phys) {
> 		err = fiemap_fill_next_extent(
> 				fieinfo, 0, phys, len, 0, flags);
> -		trace_f2fs_fiemap(inode, 0, phys, len, flags, err);
> +		trace_f2fs_fiemap(inode, 0, phys, len, 0, flags, err);
> 	}
> 
> 	return (err < 0 ? err : 0);
> @@ -1982,7 +1982,7 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
> 
> 		ret = fiemap_fill_next_extent(fieinfo, logical,
> 				phys, size, 0, flags);
> -		trace_f2fs_fiemap(inode, logical, phys, size, flags, ret);
> +		trace_f2fs_fiemap(inode, logical, phys, size, 0, flags, ret);
> 		if (ret)
> 			goto out;
> 		size = 0;
> diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
> index 49d2f87fe048..235b0d72f6fc 100644
> --- a/fs/f2fs/inline.c
> +++ b/fs/f2fs/inline.c
> @@ -808,7 +808,7 @@ int f2fs_inline_data_fiemap(struct inode *inode,
> 					(char *)F2FS_INODE(ipage);
> 	err = fiemap_fill_next_extent(
> 			fieinfo, start, byteaddr, ilen, 0, flags);
> -	trace_f2fs_fiemap(inode, start, byteaddr, ilen, flags, err);
> +	trace_f2fs_fiemap(inode, start, byteaddr, ilen, 0, flags, err);
> out:
> 	f2fs_put_page(ipage, 1);
> 	return err;
> diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
> index 7ed0fc430dc6..63706eb3a5db 100644
> --- a/include/trace/events/f2fs.h
> +++ b/include/trace/events/f2fs.h
> @@ -2276,9 +2276,10 @@ TRACE_EVENT(f2fs_bmap,
> TRACE_EVENT(f2fs_fiemap,
> 
> 	TP_PROTO(struct inode *inode, sector_t lblock, sector_t pblock,
> -		unsigned long long len, unsigned int flags, int ret),
> +		unsigned long long len, unsigned long long phys_len,
> +		unsigned int flags, int ret),
> 
> -	TP_ARGS(inode, lblock, pblock, len, flags, ret),
> +	TP_ARGS(inode, lblock, pblock, len, phys_len, flags, ret),
> 
> 	TP_STRUCT__entry(
> 		__field(dev_t, dev)
> @@ -2286,6 +2287,7 @@ TRACE_EVENT(f2fs_fiemap,
> 		__field(sector_t, lblock)
> 		__field(sector_t, pblock)
> 		__field(unsigned long long, len)
> +		__field(unsigned long long, phys_len)
> 		__field(unsigned int, flags)
> 		__field(int, ret)
> 	),
> @@ -2296,16 +2298,18 @@ TRACE_EVENT(f2fs_fiemap,
> 		__entry->lblock		= lblock;
> 		__entry->pblock		= pblock;
> 		__entry->len		= len;
> +		__entry->phys_len	= phys_len;
> 		__entry->flags		= flags;
> 		__entry->ret		= ret;
> 	),
> 
> 	TP_printk("dev = (%d,%d), ino = %lu, lblock:%lld, pblock:%lld, "
> -		"len:%llu, flags:%u, ret:%d",
> +		"len:%llu, plen:%llu, flags:%u, ret:%d",
> 		show_dev_ino(__entry),
> 		(unsigned long long)__entry->lblock,
> 		(unsigned long long)__entry->pblock,
> 		__entry->len,
> +		__entry->phys_len,
> 		__entry->flags,
> 		__entry->ret)
> );
> --
> 2.43.0
> 
> 


Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (874 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ