* [PATCH] btrfs: use ino_t for inode in tracer
@ 2017-06-12 10:10 Anand Jain
2017-06-12 13:02 ` David Sterba
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Anand Jain @ 2017-06-12 10:10 UTC (permalink / raw)
To: linux-btrfs; +Cc: dsterba
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
include/trace/events/btrfs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index e37973526153..6494e34b6df9 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -1459,7 +1459,7 @@ DECLARE_EVENT_CLASS(btrfs__qgroup_rsv_data,
TP_STRUCT__entry_btrfs(
__field( u64, rootid )
- __field( unsigned long, ino )
+ __field( ino_t, ino )
__field( u64, start )
__field( u64, len )
__field( u64, reserved )
--
2.7.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] btrfs: use ino_t for inode in tracer
2017-06-12 10:10 [PATCH] btrfs: use ino_t for inode in tracer Anand Jain
@ 2017-06-12 13:02 ` David Sterba
2017-06-13 2:51 ` [PATCH v2] " Anand Jain
2017-06-13 6:41 ` [PATCH] " Christoph Hellwig
2 siblings, 0 replies; 6+ messages in thread
From: David Sterba @ 2017-06-12 13:02 UTC (permalink / raw)
To: Anand Jain; +Cc: linux-btrfs, dsterba
On Mon, Jun 12, 2017 at 06:10:28PM +0800, Anand Jain wrote:
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
There's one more in btrfs__qgroup_data_map, please fix it as well.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] btrfs: use ino_t for inode in tracer
2017-06-12 10:10 [PATCH] btrfs: use ino_t for inode in tracer Anand Jain
2017-06-12 13:02 ` David Sterba
@ 2017-06-13 2:51 ` Anand Jain
2017-06-13 6:41 ` [PATCH] " Christoph Hellwig
2 siblings, 0 replies; 6+ messages in thread
From: Anand Jain @ 2017-06-13 2:51 UTC (permalink / raw)
To: linux-btrfs; +Cc: dsterba
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
v2: fix another location where ino_t was required.
include/trace/events/btrfs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index e37973526153..692207e3f5d5 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -1418,7 +1418,7 @@ DECLARE_EVENT_CLASS(btrfs__qgroup_data_map,
TP_STRUCT__entry_btrfs(
__field( u64, rootid )
- __field( unsigned long, ino )
+ __field( ino_t, ino )
__field( u64, free_reserved )
),
@@ -1459,7 +1459,7 @@ DECLARE_EVENT_CLASS(btrfs__qgroup_rsv_data,
TP_STRUCT__entry_btrfs(
__field( u64, rootid )
- __field( unsigned long, ino )
+ __field( ino_t, ino )
__field( u64, start )
__field( u64, len )
__field( u64, reserved )
--
2.7.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] btrfs: use ino_t for inode in tracer
2017-06-12 10:10 [PATCH] btrfs: use ino_t for inode in tracer Anand Jain
2017-06-12 13:02 ` David Sterba
2017-06-13 2:51 ` [PATCH v2] " Anand Jain
@ 2017-06-13 6:41 ` Christoph Hellwig
2017-06-13 8:12 ` Anand Jain
2 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2017-06-13 6:41 UTC (permalink / raw)
To: Anand Jain; +Cc: linux-btrfs, dsterba
I thought btrfs supports 64-bit inodes, in which case this will
truncate the inode number on 32-bit architectures.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] btrfs: use ino_t for inode in tracer
2017-06-13 6:41 ` [PATCH] " Christoph Hellwig
@ 2017-06-13 8:12 ` Anand Jain
2017-06-13 13:21 ` David Sterba
0 siblings, 1 reply; 6+ messages in thread
From: Anand Jain @ 2017-06-13 8:12 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-btrfs, dsterba
On 06/13/2017 02:41 PM, Christoph Hellwig wrote:
> I thought btrfs supports 64-bit inodes, in which case this will
> truncate the inode number on 32-bit architectures.
Good catch. Thanks !
Will send the updated patch.
Thanks, Anand
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] btrfs: use ino_t for inode in tracer
2017-06-13 8:12 ` Anand Jain
@ 2017-06-13 13:21 ` David Sterba
0 siblings, 0 replies; 6+ messages in thread
From: David Sterba @ 2017-06-13 13:21 UTC (permalink / raw)
To: Anand Jain; +Cc: Christoph Hellwig, linux-btrfs, dsterba
On Tue, Jun 13, 2017 at 04:12:10PM +0800, Anand Jain wrote:
>
>
> On 06/13/2017 02:41 PM, Christoph Hellwig wrote:
> > I thought btrfs supports 64-bit inodes, in which case this will
> > truncate the inode number on 32-bit architectures.
>
> Good catch. Thanks !
>
> Will send the updated patch.
Hold on. We should then use u64 everywhere in the tracepoints. And this
would mean more extensive changes than just switching a few types. Eg.
pass 'struct btrfs_inode' instead of 'struct inode', reflecting the
recent changes to the function prototypes to always use btrfs_inode for
any functions that do not interface to VFS.
We can use the btrfs_ino helper to extract the inode number. This is
already done in some places so this would unify them. And not only the
inode number, there are some further cleanups possible in the
tracepoints.
I'd rather not divert the work to tracepoints at this moment and
postpone it for next cycle, as the wgon ino types are not critical.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-06-13 13:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-12 10:10 [PATCH] btrfs: use ino_t for inode in tracer Anand Jain
2017-06-12 13:02 ` David Sterba
2017-06-13 2:51 ` [PATCH v2] " Anand Jain
2017-06-13 6:41 ` [PATCH] " Christoph Hellwig
2017-06-13 8:12 ` Anand Jain
2017-06-13 13:21 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).