Skip to contentSkip to conversation

Move version.h into a common include directory

PATCH In review Steve Dickson 1 participant 4 messages Sep 22, 2021 – Sep 23, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Move version.h into a common include directory

---
 support/include/version.h | 1 +
 utils/gssd/svcgssd_krb5.c | 2 +-
 utils/nfsd/nfssvc.c       | 2 +-
 utils/nfsdcld/nfsdcld.c   | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)
 create mode 120000 support/include/version.h
support/include/version.h new file +1 -0
new file mode 120000
index 00000000..b7db0bbb
@@ -0,0 +1 @@
+../../utils/mount/version.h
\ No newline at end of file
utils/gssd/svcgssd_krb5.c +1 -1
index 305d4751..2503c384 100644
@@ -46,7 +46,7 @@
 #include "gss_oids.h"
 #include "err_util.h"
 #include "svcgssd_krb5.h"
-#include "../mount/version.h"
+#include "version.h"
 
 #define MYBUFLEN 1024
 
utils/nfsd/nfssvc.c +1 -1
index 720bdd97..46452d97 100644
@@ -25,7 +25,7 @@
 #include "nfslib.h"
 #include "xlog.h"
 #include "nfssvc.h"
-#include "../mount/version.h"
+#include "version.h"
 
 #ifndef NFSD_FS_DIR
 #define NFSD_FS_DIR	  "/proc/fs/nfsd"
utils/nfsdcld/nfsdcld.c +1 -1
index 636c3983..dbc7a57f 100644
@@ -45,7 +45,7 @@
 #include "cld.h"
 #include "cld-internal.h"
 #include "sqlite.h"
-#include "../mount/version.h"
+#include "version.h"
 #include "conffile.h"
 #include "legacy.h"
 
Signature · 1 line
2.31.1
#1 lore raw

PATCH 2/2 mountd: only do NFSv4 logging on supported kernels.

---
 support/export/v4clients.c | 3 +++
 1 file changed, 3 insertions(+)
support/export/v4clients.c +3 -0
index dd985463..5e4f1058 100644
@@ -10,6 +10,7 @@
 #include <sys/inotify.h>
 #include <errno.h>
 #include "export.h"
+#include "version.h"
 
 /* search.h declares 'struct entry' and nfs_prot.h
  * does too.  Easiest fix is to trick search.h into
@@ -23,6 +24,8 @@ static int clients_fd = -1;
 
 void v4clients_init(void)
 {
+	if (linux_version_code() < MAKE_VERSION(5, 3, 0))
+		return;
 	if (clients_fd >= 0)
 		return;
 	clients_fd = inotify_init1(IN_NONBLOCK);
Signature · 1 line
2.31.1
#3 lore raw
In reply to Steve Dickson
Quoted 1 line · Steve Dickson

Committed... (tag: nfs-utils-2-5-5-rc3)

steved.

Quoted 56 lines
---
  support/include/version.h | 1 +
  utils/gssd/svcgssd_krb5.c | 2 +-
  utils/nfsd/nfssvc.c       | 2 +-
  utils/nfsdcld/nfsdcld.c   | 2 +-
  4 files changed, 4 insertions(+), 3 deletions(-)

create mode 120000 support/include/version.h

support/include/version.h new file +1 -0
new file mode 120000
index 00000000..b7db0bbb
@@ -0,0 +1 @@
+../../utils/mount/version.h
\ No newline at end of file
utils/gssd/svcgssd_krb5.c +1 -1
index 305d4751..2503c384 100644
@@ -46,7 +46,7 @@
  #include "gss_oids.h"
  #include "err_util.h"
  #include "svcgssd_krb5.h"
-#include "../mount/version.h"
+#include "version.h"
 
  #define MYBUFLEN 1024
 
utils/nfsd/nfssvc.c +1 -1
index 720bdd97..46452d97 100644
@@ -25,7 +25,7 @@
  #include "nfslib.h"
  #include "xlog.h"
  #include "nfssvc.h"
-#include "../mount/version.h"
+#include "version.h"
 
  #ifndef NFSD_FS_DIR
  #define NFSD_FS_DIR	  "/proc/fs/nfsd"
utils/nfsdcld/nfsdcld.c +1 -1
index 636c3983..dbc7a57f 100644
@@ -45,7 +45,7 @@
  #include "cld.h"
  #include "cld-internal.h"
  #include "sqlite.h"
-#include "../mount/version.h"
+#include "version.h"
  #include "conffile.h"
  #include "legacy.h"
 
#2 lore raw

Re: [PATCH 2/2] mountd: only do NFSv4 logging on supported kernels.

In reply to Steve Dickson
Quoted 2 lines · Steve Dickson

Committed... (tag: nfs-utils-2-5-5-rc3)

steved.

Quoted 26 lines
---
  support/export/v4clients.c | 3 +++
  1 file changed, 3 insertions(+)
support/export/v4clients.c +3 -0
index dd985463..5e4f1058 100644
@@ -10,6 +10,7 @@
  #include <sys/inotify.h>
  #include <errno.h>
  #include "export.h"
+#include "version.h"
 
  /* search.h declares 'struct entry' and nfs_prot.h
   * does too.  Easiest fix is to trick search.h into
@@ -23,6 +24,8 @@ static int clients_fd = -1;
 
  void v4clients_init(void)
  {
+	if (linux_version_code() < MAKE_VERSION(5, 3, 0))
+		return;
  	if (clients_fd >= 0)
  		return;
  	clients_fd = inotify_init1(IN_NONBLOCK);