Skip to content

Commit 8a34c92

Browse files
committedAug 12, 2022
Update to support Linux kernel 3.19-rc1 and higher
Note however that this drops support for Linux kernels older than 2.6.20-rc1 (Dec 8, 2006). torvalds/linux/commit/0f7fc9e4d03987fe29f6dd4aa67e4c56eb7ecb05 The above-referenced commit in the Linux kernel introduced f_dentry as a macro to allow code to reference the old dentry struct while switching its type from dentry to path. torvalds/linux/commit/78d28e651f97866d608d9b41f8ad291e65d47dd5 The above-referenced commit in the Linux kernel removed f_dentry macro, now requiring code -- after a collective 34 years of being able to refer to the dentry path by the name f_dentry -- change to instead refer to it by its proper name, f_path.dentry (wherein the dentry moved inside f_path). If your code had been under a rock for the past 16 years, you would be forgiven for not having updated from f_dentry to f_path.dentry but you really should update.
1 parent 2e6b69f commit 8a34c92

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎nfsdtop.linux

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
############################################################ IDENT(1)
44
#
55
# $Title: Script to generate top-like statistics for nfsd I/O $
6-
# $Copyright: 2020-2021 Devin Teske. All rights reserved. $
7-
# $FrauBSD: nfsdtop/nfsdtop.linux 2021-01-05 15:07:38 -0800 freebsdfrau $
6+
# $Copyright: 2020-2022 Devin Teske. All rights reserved. $
7+
# $FrauBSD: nfsdtop/nfsdtop.linux 2022-08-11 17:39:04 -0700 freebsdfrau $
88
#
99
############################################################ INFORMATION
1010
#
@@ -60,7 +60,7 @@ DEFAULT_IP_MAP=.nfsd.hosts
6060

6161
############################################################ GLOBALS
6262

63-
VERSION='$Version: 8.0-alpha-3 $'
63+
VERSION='$Version: 8.0-alpha-4 $'
6464

6565
pgm="${0##*/}" # Program basename
6666

@@ -740,7 +740,7 @@ ${NEED_SERVER:+
740740
741741
${VIEW_FILE:+
742742
\$file = @nfsd_getattr_filep[tid];
743-
\$de = \$file->f_dentry;
743+
\$de = \$file->f_path.dentry;
744744
\$n1 = \$de->d_name.name;
745745
\$de = \$de->d_parent;
746746
\$n2 = \$de->d_name.name;
@@ -898,7 +898,7 @@ ${VIEW_CLIENT:+
898898
899899
${VIEW_FILE:+
900900
\$file = @nfsd_read_filep[tid];
901-
\$de = \$file->f_dentry;
901+
\$de = \$file->f_path.dentry;
902902
\$n1 = \$de->d_name.name;
903903
\$de = \$de->d_parent;
904904
\$n2 = \$de->d_name.name;
@@ -1012,7 +1012,7 @@ ${VIEW_CLIENT:+
10121012
10131013
${VIEW_FILE:+
10141014
\$file = \$readp->rd_filp;
1015-
\$de = \$file->f_dentry;
1015+
\$de = \$file->f_path.dentry;
10161016
\$n1 = \$de->d_name.name;
10171017
\$de = \$de->d_parent;
10181018
\$n2 = \$de->d_name.name;
@@ -1128,7 +1128,7 @@ ${VIEW_CLIENT:+
11281128
11291129
${VIEW_FILE:+
11301130
\$file = @nfsd_write_filep[tid];
1131-
\$de = \$file->f_dentry;
1131+
\$de = \$file->f_path.dentry;
11321132
\$n1 = \$de->d_name.name;
11331133
\$de = \$de->d_parent;
11341134
\$n2 = \$de->d_name.name;

0 commit comments

Comments
 (0)
Please sign in to comment.