Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
549351d709 | ||
|
eb3659bb92 | ||
|
fd90d8b697 | ||
|
21846fc76e | ||
|
5a95d4652b | ||
|
c0b91641c1 | ||
|
e21bce4e0b | ||
|
88a12e6451 | ||
|
ed9485760e | ||
|
3d2542a546 | ||
|
fc60335605 | ||
|
8bcfe55a1e | ||
|
cec90c547f | ||
|
784620fc2d | ||
|
71d3be57a7 | ||
|
a98c248b21 | ||
|
161f7ea377 | ||
|
9648327ec5 | ||
|
c67d6e0c87 | ||
|
ebe181b01e | ||
|
2c29028616 | ||
|
b38ae8bc7f | ||
|
b7fd4e0717 | ||
|
b32501fca4 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*.tar.gz
|
||||
*.rpm
|
1
dead.package
Normal file
1
dead.package
Normal file
@ -0,0 +1 @@
|
||||
Obsoleted by NFS-Ganesha in the CentOS Storage SIG
|
@ -1,91 +0,0 @@
|
||||
--- nfs-ganesha-2.0.0/src/CMakeLists.txt.orig 2014-05-20 13:58:50.685211144 -0400
|
||||
+++ nfs-ganesha-2.0.0/src/CMakeLists.txt 2014-05-20 14:00:24.825924703 -0400
|
||||
@@ -125,6 +125,7 @@
|
||||
|
||||
if (LINUX)
|
||||
set(PLATFORM "LINUX")
|
||||
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE")
|
||||
set(OS_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include/os/linux")
|
||||
find_library(LIBDL dl) # module loader
|
||||
endif(LINUX)
|
||||
--- nfs-ganesha-2.0.0/src/os/linux/subr.c.orig 2014-05-20 14:02:56.340987294 -0400
|
||||
+++ nfs-ganesha-2.0.0/src/os/linux/subr.c 2014-05-20 14:03:41.196565516 -0400
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <sys/syscall.h>
|
||||
#include "os/subr.h"
|
||||
|
||||
+#ifdef NOT_TRUE
|
||||
/* not defined in linux headers so we do it here
|
||||
*/
|
||||
struct linux_dirent {
|
||||
@@ -50,6 +51,7 @@
|
||||
// offset is (d_reclen - 1))
|
||||
*/
|
||||
};
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* @brief Read system directory entries into the buffer
|
||||
@@ -63,7 +65,7 @@
|
||||
{
|
||||
int retval = 0;
|
||||
|
||||
- retval = syscall(SYS_getdents, fd, buf, bcount);
|
||||
+ retval = syscall(SYS_getdents64, fd, buf, bcount);
|
||||
if (retval >= 0)
|
||||
*basepp += retval;
|
||||
return retval;
|
||||
@@ -82,7 +84,7 @@
|
||||
|
||||
bool to_vfs_dirent(char *buf, int bpos, struct vfs_dirent *vd, off_t base)
|
||||
{
|
||||
- struct linux_dirent *dp = (struct linux_dirent *)(buf + bpos);
|
||||
+ struct dirent64 *dp = (struct dirent64 *)(buf + bpos);
|
||||
char type;
|
||||
|
||||
vd->vd_ino = dp->d_ino;
|
||||
--- nfs-ganesha-2.0.0/src/FSAL/FSAL_GPFS/handle.c.orig 2014-05-20 14:30:03.880250822 -0400
|
||||
+++ nfs-ganesha-2.0.0/src/FSAL/FSAL_GPFS/handle.c 2014-05-20 14:31:41.470619655 -0400
|
||||
@@ -438,6 +438,7 @@
|
||||
return status;
|
||||
}
|
||||
|
||||
+#ifdef NOT_TRUE
|
||||
/* not defined in linux headers so we do it here
|
||||
*/
|
||||
|
||||
@@ -455,6 +456,7 @@
|
||||
// offset is (d_reclen - 1))
|
||||
*/
|
||||
};
|
||||
+#endif
|
||||
|
||||
#define BUF_SIZE 1024
|
||||
/**
|
||||
@@ -480,7 +482,7 @@
|
||||
fsal_status_t status;
|
||||
off_t seekloc = 0;
|
||||
int bpos, cnt, nread;
|
||||
- struct linux_dirent *dentry;
|
||||
+ struct dirent64 *dentry;
|
||||
char buf[BUF_SIZE];
|
||||
|
||||
if (whence != NULL)
|
||||
@@ -502,7 +504,7 @@
|
||||
}
|
||||
cnt = 0;
|
||||
do {
|
||||
- nread = syscall(SYS_getdents, dirfd, buf, BUF_SIZE);
|
||||
+ nread = syscall(SYS_getdents64, dirfd, buf, BUF_SIZE);
|
||||
if (nread < 0) {
|
||||
retval = errno;
|
||||
fsal_error = posix2fsal_error(retval);
|
||||
@@ -511,7 +513,7 @@
|
||||
if (nread == 0)
|
||||
break;
|
||||
for (bpos = 0; bpos < nread;) {
|
||||
- dentry = (struct linux_dirent *)(buf + bpos);
|
||||
+ dentry = (struct dirent64 *)(buf + bpos);
|
||||
if (strcmp(dentry->d_name, ".") == 0
|
||||
|| strcmp(dentry->d_name, "..") == 0)
|
||||
goto skip; /* must skip '.' and '..' */
|
@ -1,18 +0,0 @@
|
||||
--- nfs-ganesha-2.0.0/src/FSAL/FSAL_CEPH/handle.c.orig 2014-06-02 01:49:21.711983531 -0400
|
||||
+++ nfs-ganesha-2.0.0/src/FSAL/FSAL_CEPH/handle.c 2014-06-02 01:50:57.119983531 -0400
|
||||
@@ -374,12 +374,13 @@
|
||||
/* The private 'full' directory handle */
|
||||
struct handle *link = container_of(link_pub, struct handle, handle);
|
||||
/* Pointer to the Ceph link content */
|
||||
- char *content = NULL;
|
||||
+ char content[4096] = {0,};
|
||||
|
||||
/* Content points into a static buffer in the Ceph client's
|
||||
cache, so we don't have to free it. */
|
||||
|
||||
- rc = ceph_ll_readlink(export->cmount, link->i, &content, 0, 0);
|
||||
+ rc = ceph_ll_readlink(export->cmount, link->i,
|
||||
+ content, sizeof content, 0, 0);
|
||||
|
||||
if (rc < 0)
|
||||
return ceph2fsal_error(rc);
|
@ -1,12 +0,0 @@
|
||||
diff -up nfs-ganesha-2.0.0/src/FSAL/FSAL_LUSTRE/fsal_handle.h.lustre-strict nfs-ganesha-2.0.0/src/FSAL/FSAL_LUSTRE/fsal_handle.h
|
||||
--- nfs-ganesha-2.0.0/src/FSAL/FSAL_LUSTRE/fsal_handle.h.lustre-strict 2013-12-10 16:01:48.823633927 -0800
|
||||
+++ nfs-ganesha-2.0.0/src/FSAL/FSAL_LUSTRE/fsal_handle.h 2013-12-10 16:02:38.036661006 -0800
|
||||
@@ -109,7 +109,7 @@ static inline int lustre_name_to_handle_
|
||||
struct lustre_file_handle
|
||||
*out_handle, int flags)
|
||||
{
|
||||
- char path[MAXPATHLEN];
|
||||
+ char path[MAXPATHLEN + 2];
|
||||
|
||||
if (!mntpath || !at_handle || !name || !out_handle)
|
||||
return -1;
|
@ -1,12 +0,0 @@
|
||||
*** nfs-ganesha-2.0.0/src/CMakeLists.txt.orig 2013-12-11 12:46:24.587001058 -0500
|
||||
--- nfs-ganesha-2.0.0/src/CMakeLists.txt 2013-12-11 12:47:27.314999423 -0500
|
||||
***************
|
||||
*** 34,39 ****
|
||||
--- 34,40 ----
|
||||
|
||||
# find out which platform we are building on
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-strict-aliasing")
|
||||
set(LINUX ON)
|
||||
set(UNIX ON)
|
||||
# Now detects the Linux's distro
|
@ -1,26 +0,0 @@
|
||||
--- nfs-ganesha-pre-2.0-RC3/src/os/linux/subr.c.orig 2013-11-04 13:17:41.284000000 -0500
|
||||
+++ nfs-ganesha-pre-2.0-RC3/src/os/linux/subr.c 2013-11-04 13:31:05.496000000 -0500
|
||||
@@ -127,7 +127,6 @@
|
||||
{
|
||||
uid_t orig_uid = setfsuid(uid);
|
||||
if (uid != setfsuid(uid)) {
|
||||
- setfsuid(orig_uid);
|
||||
LogCrit(COMPONENT_FSAL, "Could not set user identity");
|
||||
}
|
||||
return orig_uid;
|
||||
@@ -137,7 +136,6 @@
|
||||
{
|
||||
gid_t orig_gid = setfsgid(gid);
|
||||
if (gid != setfsgid(gid)) {
|
||||
- setfsgid(orig_gid);
|
||||
LogCrit(COMPONENT_FSAL, "Could not set group identity");
|
||||
}
|
||||
return orig_gid;
|
||||
--- nfs-ganesha-pre-2.0-RC3/src/tools/ganestat.pl.orig 2013-11-04 16:46:40.414916999 -0500
|
||||
+++ nfs-ganesha-pre-2.0-RC3/src/tools/ganestat.pl 2013-11-04 16:47:09.108916999 -0500
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/env perl
|
||||
+#!/usr/bin/perl
|
||||
#
|
||||
################## Doxygen header ##################
|
||||
#*
|
@ -1,19 +0,0 @@
|
||||
*** nfs-ganesha-2.1.0/src/include/cache_inode.h.orig 2015-02-12 11:12:22.218718318 -0500
|
||||
--- nfs-ganesha-2.1.0/src/include/cache_inode.h 2015-02-12 11:12:37.967718318 -0500
|
||||
***************
|
||||
*** 879,885 ****
|
||||
cache_inode_status_t cache_inode_invalidate(cache_entry_t *entry,
|
||||
uint32_t flags);
|
||||
|
||||
! inline int cache_inode_set_time_current(struct timespec *time);
|
||||
|
||||
void cache_inode_destroyer(void);
|
||||
|
||||
--- 879,885 ----
|
||||
cache_inode_status_t cache_inode_invalidate(cache_entry_t *entry,
|
||||
uint32_t flags);
|
||||
|
||||
! int cache_inode_set_time_current(struct timespec *time);
|
||||
|
||||
void cache_inode_destroyer(void);
|
||||
|
@ -1,19 +0,0 @@
|
||||
*** nfs-ganesha-2.1.0/src/cache_inode/cache_inode_getattr.c.orig 2014-06-27 10:06:09.273133273 -0400
|
||||
--- nfs-ganesha-2.1.0/src/cache_inode/cache_inode_getattr.c 2014-06-27 10:06:45.677133273 -0400
|
||||
***************
|
||||
*** 71,77 ****
|
||||
cache_inode_getattr_cb_t cb)
|
||||
{
|
||||
cache_inode_status_t status;
|
||||
! struct gsh_export *junction_export;
|
||||
cache_entry_t *junction_entry;
|
||||
uint64_t mounted_on_fileid;
|
||||
|
||||
--- 71,77 ----
|
||||
cache_inode_getattr_cb_t cb)
|
||||
{
|
||||
cache_inode_status_t status;
|
||||
! struct gsh_export *junction_export = NULL;
|
||||
cache_entry_t *junction_entry;
|
||||
uint64_t mounted_on_fileid;
|
||||
|
@ -1,19 +0,0 @@
|
||||
*** nfs-ganesha-2.1.0/src/FSAL/commonlib.c.orig 2014-06-27 14:08:23.118133273 -0400
|
||||
--- nfs-ganesha-2.1.0/src/FSAL/commonlib.c 2014-06-27 14:09:12.677133273 -0400
|
||||
***************
|
||||
*** 752,758 ****
|
||||
int change_fsid_type(struct fsal_filesystem *fs,
|
||||
enum fsid_type fsid_type)
|
||||
{
|
||||
! uint64_t major, minor;
|
||||
bool valid = false;
|
||||
|
||||
if (fs->fsid_type == fsid_type)
|
||||
--- 752,758 ----
|
||||
int change_fsid_type(struct fsal_filesystem *fs,
|
||||
enum fsid_type fsid_type)
|
||||
{
|
||||
! uint64_t major = 0, minor = 0;
|
||||
bool valid = false;
|
||||
|
||||
if (fs->fsid_type == fsid_type)
|
@ -1,19 +0,0 @@
|
||||
*** nfs-ganesha-2.1.0/src/include/config-h.in.cmake.orig 2014-06-27 11:38:56.845133273 -0400
|
||||
--- nfs-ganesha-2.1.0/src/include/config-h.in.cmake 2014-06-27 11:39:09.294133273 -0400
|
||||
***************
|
||||
*** 14,20 ****
|
||||
#define _GIT_HEAD_COMMIT "@_GIT_HEAD_COMMIT@"
|
||||
#define _GIT_DESCRIBE "@_GIT_DESCRIBE@"
|
||||
#define BUILD_HOST "@BUILD_HOST_NAME@"
|
||||
! #define FSAL_MODULE_LOC "@MODULES_PATH@/@FSAL_DESTINATION@"
|
||||
/* Build controls */
|
||||
|
||||
#cmakedefine _MSPAC_SUPPORT 1
|
||||
--- 14,20 ----
|
||||
#define _GIT_HEAD_COMMIT "@_GIT_HEAD_COMMIT@"
|
||||
#define _GIT_DESCRIBE "@_GIT_DESCRIBE@"
|
||||
#define BUILD_HOST "@BUILD_HOST_NAME@"
|
||||
! #define FSAL_MODULE_LOC "/usr/@FSAL_DESTINATION@"
|
||||
/* Build controls */
|
||||
|
||||
#cmakedefine _MSPAC_SUPPORT 1
|
@ -1,44 +0,0 @@
|
||||
*** nfs-ganesha-2.1.0/src/config_parsing/config_parsing.c.orig 2014-06-27 07:42:33.850133273 -0400
|
||||
--- nfs-ganesha-2.1.0/src/config_parsing/config_parsing.c 2014-06-27 09:59:59.758133273 -0400
|
||||
***************
|
||||
*** 1567,1573 ****
|
||||
struct config_node *sub_node;
|
||||
struct config_node *top;
|
||||
struct expr_parse *expr, *expr_head;
|
||||
! struct config_node_list *list = NULL, *list_tail;
|
||||
char *ep;
|
||||
int rc = EINVAL;
|
||||
bool found = false;
|
||||
--- 1567,1573 ----
|
||||
struct config_node *sub_node;
|
||||
struct config_node *top;
|
||||
struct expr_parse *expr, *expr_head;
|
||||
! struct config_node_list *list = NULL, *list_tail = NULL;
|
||||
char *ep;
|
||||
int rc = EINVAL;
|
||||
bool found = false;
|
||||
***************
|
||||
*** 1599,1607 ****
|
||||
list->tree_node = sub_node;
|
||||
if (*node_list == NULL)
|
||||
*node_list = list;
|
||||
! else
|
||||
list_tail->next = list;
|
||||
! list_tail = list;
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
--- 1599,1611 ----
|
||||
list->tree_node = sub_node;
|
||||
if (*node_list == NULL)
|
||||
*node_list = list;
|
||||
! else if (list_tail != NULL)
|
||||
list_tail->next = list;
|
||||
! else {
|
||||
! for (list_tail = (*node_list)->next;
|
||||
! list_tail->next != NULL; )
|
||||
! list_tail = list_tail->next;
|
||||
! }
|
||||
found = true;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
*** nfs-ganesha-2.1.0/src/Protocols/NFS/nfs4_op_secinfo.c.orig 2014-06-30 07:54:56.787133273 -0400
|
||||
--- nfs-ganesha-2.1.0/src/Protocols/NFS/nfs4_op_secinfo.c 2014-06-30 07:55:58.190133273 -0400
|
||||
***************
|
||||
*** 65,71 ****
|
||||
cache_entry_t *entry_src = NULL;
|
||||
sec_oid4 v5oid = { krb5oid.length, (char *)krb5oid.elements };
|
||||
int num_entry = 0;
|
||||
! struct export_perms save_export_perms;
|
||||
struct gsh_export *saved_gsh_export = NULL;
|
||||
|
||||
resp->resop = NFS4_OP_SECINFO;
|
||||
--- 65,71 ----
|
||||
cache_entry_t *entry_src = NULL;
|
||||
sec_oid4 v5oid = { krb5oid.length, (char *)krb5oid.elements };
|
||||
int num_entry = 0;
|
||||
! struct export_perms save_export_perms = {0,};
|
||||
struct gsh_export *saved_gsh_export = NULL;
|
||||
|
||||
resp->resop = NFS4_OP_SECINFO;
|
@ -1,23 +0,0 @@
|
||||
*** nfs-ganesha-2.1.0/src/Protocols/NFS/nfs4_pseudo.c.orig 2014-06-27 10:14:43.556133273 -0400
|
||||
--- nfs-ganesha-2.1.0/src/Protocols/NFS/nfs4_pseudo.c 2014-06-27 10:17:10.928133273 -0400
|
||||
***************
|
||||
*** 385,393 ****
|
||||
/* Now we need to process the rest of the path, creating directories
|
||||
* if necessary.
|
||||
*/
|
||||
! for (tok = strtok_r(rest, "/", &saveptr);
|
||||
! tok;
|
||||
! tok = strtok_r(NULL, "/", &saveptr)) {
|
||||
rc = make_pseudofs_node(tok, &state);
|
||||
if (!rc) {
|
||||
/* Release reference on mount point inode
|
||||
--- 385,393 ----
|
||||
/* Now we need to process the rest of the path, creating directories
|
||||
* if necessary.
|
||||
*/
|
||||
! saveptr = NULL;
|
||||
! tok = strtok_r(rest, "/", &saveptr);
|
||||
! for (; tok; tok = strtok_r(NULL, "/", &saveptr)) {
|
||||
rc = make_pseudofs_node(tok, &state);
|
||||
if (!rc) {
|
||||
/* Release reference on mount point inode
|
@ -1,21 +0,0 @@
|
||||
*** nfs-ganesha-2.1.0/src/SAL/state_lock.c.orig 2015-02-12 11:44:24.233718318 -0500
|
||||
--- nfs-ganesha-2.1.0/src/SAL/state_lock.c 2015-02-12 11:45:06.679718318 -0500
|
||||
***************
|
||||
*** 611,618 ****
|
||||
*
|
||||
* @return New entry or NULL.
|
||||
*/
|
||||
! inline state_lock_entry_t *state_lock_entry_t_dup(state_lock_entry_t *
|
||||
! orig_entry)
|
||||
{
|
||||
return create_state_lock_entry(orig_entry->sle_entry,
|
||||
orig_entry->sle_export,
|
||||
--- 611,618 ----
|
||||
*
|
||||
* @return New entry or NULL.
|
||||
*/
|
||||
! static inline state_lock_entry_t *state_lock_entry_t_dup(state_lock_entry_t *
|
||||
! orig_entry)
|
||||
{
|
||||
return create_state_lock_entry(orig_entry->sle_entry,
|
||||
orig_entry->sle_export,
|
@ -1,19 +0,0 @@
|
||||
*** nfs-ganesha-2.1.0/src/support/CMakeLists.txt.orig 2014-07-01 11:06:16.219133273 -0400
|
||||
--- nfs-ganesha-2.1.0/src/support/CMakeLists.txt 2014-07-01 11:05:03.312133273 -0400
|
||||
***************
|
||||
*** 33,39 ****
|
||||
uid2grp_cache.c
|
||||
)
|
||||
|
||||
! add_library( uid2grp ${uid2grp_SRCS} )
|
||||
|
||||
########### next target ###############
|
||||
|
||||
--- 33,39 ----
|
||||
uid2grp_cache.c
|
||||
)
|
||||
|
||||
! add_library( uid2grp STATIC ${uid2grp_SRCS} )
|
||||
|
||||
########### next target ###############
|
||||
|
@ -1,69 +0,0 @@
|
||||
--- nfs-ganesha-2.2.0/src/CMakeLists.txt.orig 2015-07-07 13:43:35.435240859 -0400
|
||||
+++ nfs-ganesha-2.2.0/src/CMakeLists.txt 2015-07-07 13:48:51.917240859 -0400
|
||||
@@ -716,9 +716,12 @@
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/portability_cmake_2.8 /usr/share/cmake/Modules ${CMAKE_MODULE_PATH})
|
||||
endif( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8" )
|
||||
|
||||
+find_library(LIBNTIRPC ntirpc) # extended Pthreads functions
|
||||
+
|
||||
+set(CMAKE_C_FLAGS "-isystem /usr/include/ntirpc ${CMAKE_C_FLAGS}")
|
||||
+
|
||||
include_directories(
|
||||
"${PROJECT_BINARY_DIR}/include"
|
||||
- "${PROJECT_SOURCE_DIR}/libntirpc/ntirpc/"
|
||||
"${PROJECT_SOURCE_DIR}/include"
|
||||
"${OS_INCLUDE_DIR}"
|
||||
"${KRB5_INCLUDE_DIRS}"
|
||||
@@ -732,14 +735,13 @@
|
||||
set(_USE_CB_SIMULATOR ON)
|
||||
endif(USE_CB_SIMULATOR)
|
||||
|
||||
-
|
||||
#callers add:
|
||||
# target_link_libraries(your_library ${LIBTIRPC_LIBRARIES})
|
||||
-set(LIBTIRPC_INCLUDE_DIR
|
||||
- "${PROJECT_BINARY_DIR}/libtirpc/ntirpc"
|
||||
- "${PROJECT_BINARY_DIR}/libtirpc/ntirpc/rpc"
|
||||
-)
|
||||
-set(LIBTIRPC_LIBRARIES "${PROJECT_BINARY_DIR}/libntirpc/src/libntirpc.a")
|
||||
+#set(LIBTIRPC_INCLUDE_DIR
|
||||
+# "${PROJECT_BINARY_DIR}/libtirpc/ntirpc"
|
||||
+# "${PROJECT_BINARY_DIR}/libtirpc/ntirpc/rpc"
|
||||
+#)
|
||||
+#set(LIBTIRPC_LIBRARIES "${PROJECT_BINARY_DIR}/libntirpc/src/libntirpc.a")
|
||||
|
||||
# Find misc system libs
|
||||
find_library(LIBRT rt) # extended Pthreads functions
|
||||
@@ -867,6 +869,7 @@
|
||||
${KRB5_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${LIBRT}
|
||||
+ ${LIBNTIRPC}
|
||||
)
|
||||
|
||||
# Config file; make sure it doesn't clobber an existing one
|
||||
@@ -877,16 +880,6 @@
|
||||
# pre-create PREFIX/var/run/ganesha
|
||||
install(DIRECTORY DESTINATION ${SYSSTATEDIR}/run/ganesha)
|
||||
|
||||
-IF( NOT EXISTS ${PROJECT_SOURCE_DIR}/libntirpc/CMakeLists.txt )
|
||||
-message( FATAL_ERROR
|
||||
-"No CMakeLists.txt found in libntirpc
|
||||
-This probably means that the directory was not properly populated.
|
||||
-Please run the following command to do that and use cmake again:
|
||||
- git submodule update --init
|
||||
-Alternatively, if you are not using git, get the current version at
|
||||
- https://github.com/nfs-ganesha/ntirpc" )
|
||||
-ENDIF( NOT EXISTS ${PROJECT_SOURCE_DIR}/libntirpc/CMakeLists.txt )
|
||||
-
|
||||
add_subdirectory(log)
|
||||
add_subdirectory(config_parsing)
|
||||
add_subdirectory(cidr)
|
||||
@@ -896,7 +889,6 @@
|
||||
add_subdirectory(NodeList)
|
||||
add_subdirectory(cache_inode)
|
||||
add_subdirectory(SAL)
|
||||
-add_subdirectory(libntirpc)
|
||||
add_subdirectory(RPCAL)
|
||||
add_subdirectory(Protocols)
|
||||
add_subdirectory(support)
|
@ -1,684 +0,0 @@
|
||||
--- nfs-ganesha-2.3-rc1/src/cache_inode/cache_inode_avl.c.orig 2015-09-10 09:39:55.666344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/cache_inode/cache_inode_avl.c 2015-09-10 09:45:02.850344661 -0400
|
||||
@@ -234,7 +234,7 @@
|
||||
/* tmp hook : it seems like client running v9fs dislike "negative"
|
||||
* cookies just kill the sign bit, making
|
||||
* cookies 63 bits... */
|
||||
- v->hk.k &= ~(1L << 63);
|
||||
+ v->hk.k &= ~(1ULL << 63);
|
||||
#endif
|
||||
|
||||
/* XXX would we really wait for UINT64_MAX? if not, how many
|
||||
@@ -259,7 +259,7 @@
|
||||
#ifdef _USE_9P
|
||||
/* tmp hook : it seems like client running v9fs dislike "negative"
|
||||
* cookies */
|
||||
- v->hk.k &= ~(1L << 63);
|
||||
+ v->hk.k &= ~(1ULL << 63);
|
||||
#endif
|
||||
for (j2 = 1 /* tried j=0 */; j2 < UINT64_MAX; j2++) {
|
||||
v->hk.k = v->hk.k + j2;
|
||||
@@ -346,7 +346,7 @@
|
||||
#ifdef _USE_9P
|
||||
/* tmp hook : it seems like client running v9fs dislike "negative"
|
||||
* cookies */
|
||||
- v.hk.k &= ~(1L << 63);
|
||||
+ v.hk.k &= ~(1ULL << 63);
|
||||
#endif
|
||||
|
||||
for (j = 0; j < maxj; j++) {
|
||||
--- nfs-ganesha-2.3-rc1/src/cache_inode/cache_inode_lru.c.orig 2015-09-10 09:07:18.903344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/cache_inode/cache_inode_lru.c 2015-09-10 09:24:01.710344661 -0400
|
||||
@@ -708,7 +708,7 @@
|
||||
lru_state.futility = 0;
|
||||
}
|
||||
|
||||
- LogFullDebug(COMPONENT_CACHE_INODE_LRU, "lru entries: %zu",
|
||||
+ LogFullDebug(COMPONENT_CACHE_INODE_LRU, "lru entries: %" PRIu64,
|
||||
lru_state.entries_used);
|
||||
|
||||
/* Reap file descriptors. This is a preliminary example of the
|
||||
@@ -745,7 +745,7 @@
|
||||
LogFullDebug(COMPONENT_CACHE_INODE_LRU,
|
||||
"fdrate:%u fdcount:%zd slept for %" PRIu64 " sec",
|
||||
fdratepersec, formeropen,
|
||||
- curr_time - lru_state.prev_time);
|
||||
+ ((uint64_t) (curr_time - lru_state.prev_time)));
|
||||
|
||||
if (extremis) {
|
||||
LogDebug(COMPONENT_CACHE_INODE_LRU,
|
||||
@@ -925,7 +925,8 @@
|
||||
"After work, open_fd_count:%zd count:%" PRIu64
|
||||
" fdrate:%u threadwait=%" PRIu64,
|
||||
atomic_fetch_size_t(&open_fd_count),
|
||||
- lru_state.entries_used, fdratepersec, threadwait);
|
||||
+ lru_state.entries_used, fdratepersec,
|
||||
+ ((uint64_t) threadwait));
|
||||
LogFullDebug(COMPONENT_CACHE_INODE_LRU,
|
||||
"currentopen=%zd futility=%d totalwork=%zd biggest_window=%d extremis=%d lanes=%d fds_lowat=%d ",
|
||||
currentopen, lru_state.futility, totalwork,
|
||||
--- nfs-ganesha-2.3-rc1/src/CMakeLists.txt.orig 2015-09-09 13:59:07.919344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/CMakeLists.txt 2015-09-09 14:04:39.235344661 -0400
|
||||
@@ -761,9 +761,12 @@
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/portability_cmake_2.8 /usr/share/cmake/Modules ${CMAKE_MODULE_PATH})
|
||||
endif( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8" )
|
||||
|
||||
+find_library(LIBNTIRPC ntirpc) # extended Pthreads functions
|
||||
+
|
||||
+set(CMAKE_C_FLAGS "-isystem /usr/include/ntirpc ${CMAKE_C_FLAGS}")
|
||||
+
|
||||
include_directories(
|
||||
"${PROJECT_BINARY_DIR}/include"
|
||||
- "${PROJECT_SOURCE_DIR}/libntirpc/ntirpc/"
|
||||
"${PROJECT_SOURCE_DIR}/include"
|
||||
"${OS_INCLUDE_DIR}"
|
||||
"${KRB5_INCLUDE_DIRS}"
|
||||
@@ -779,12 +782,6 @@
|
||||
|
||||
|
||||
#callers add:
|
||||
-# target_link_libraries(your_library ${LIBTIRPC_LIBRARIES})
|
||||
-set(LIBTIRPC_INCLUDE_DIR
|
||||
- "${PROJECT_BINARY_DIR}/libtirpc/ntirpc"
|
||||
- "${PROJECT_BINARY_DIR}/libtirpc/ntirpc/rpc"
|
||||
-)
|
||||
-set(LIBTIRPC_LIBRARIES ntirpc)
|
||||
|
||||
# Find misc system libs
|
||||
find_library(LIBRT rt) # extended Pthreads functions
|
||||
@@ -912,6 +909,7 @@
|
||||
${KRB5_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${LIBRT}
|
||||
+ ${LIBNTIRPC}
|
||||
)
|
||||
|
||||
# Config file; make sure it doesn't clobber an existing one
|
||||
@@ -922,16 +920,6 @@
|
||||
# pre-create PREFIX/var/run/ganesha
|
||||
install(DIRECTORY DESTINATION ${SYSSTATEDIR}/run/ganesha)
|
||||
|
||||
-IF( NOT EXISTS ${PROJECT_SOURCE_DIR}/libntirpc/CMakeLists.txt )
|
||||
-message( FATAL_ERROR
|
||||
-"No CMakeLists.txt found in libntirpc
|
||||
-This probably means that the directory was not properly populated.
|
||||
-Please run the following command to do that and use cmake again:
|
||||
- git submodule update --init
|
||||
-Alternatively, if you are not using git, get the current version at
|
||||
- https://github.com/nfs-ganesha/ntirpc" )
|
||||
-ENDIF( NOT EXISTS ${PROJECT_SOURCE_DIR}/libntirpc/CMakeLists.txt )
|
||||
-
|
||||
add_subdirectory(log)
|
||||
add_subdirectory(config_parsing)
|
||||
add_subdirectory(cidr)
|
||||
@@ -941,7 +929,6 @@
|
||||
add_subdirectory(NodeList)
|
||||
add_subdirectory(cache_inode)
|
||||
add_subdirectory(SAL)
|
||||
-add_subdirectory(libntirpc)
|
||||
add_subdirectory(RPCAL)
|
||||
add_subdirectory(Protocols)
|
||||
add_subdirectory(support)
|
||||
--- nfs-ganesha-2.3-rc1/src/config_parsing/analyse.c.orig 2015-09-10 08:23:22.091344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/config_parsing/analyse.c 2015-09-10 08:25:12.379344661 -0400
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
assert(tree->root.type == TYPE_ROOT);
|
||||
fprintf(output, "<SUMMARY>\n");
|
||||
- fprintf(output, " <BLOCK_COUNT> %ld </BLOCKCOUNT>\n",
|
||||
+ fprintf(output, " <BLOCK_COUNT> %zd </BLOCKCOUNT>\n",
|
||||
glist_length(&tree->root.u.nterm.sub_nodes));
|
||||
fprintf(output, " <CONFIGURATION_FILES>\n");
|
||||
for (file = tree->files; file != NULL; file = file->next)
|
||||
--- nfs-ganesha-2.3-rc1/src/config_parsing/config_parsing.c.orig 2015-09-10 08:41:39.615344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/config_parsing/config_parsing.c 2015-09-10 09:01:37.684344661 -0400
|
||||
@@ -758,13 +758,13 @@
|
||||
struct config_error_type *err_type)
|
||||
{
|
||||
struct config_item *item;
|
||||
- caddr_t *param_addr;
|
||||
+ void *param_addr;
|
||||
sockaddr_t *sock;
|
||||
int rc;
|
||||
int errors = 0;
|
||||
|
||||
for (item = params; item->name != NULL; item++) {
|
||||
- param_addr = (caddr_t *)((uint64_t)param_struct + item->off);
|
||||
+ param_addr = ((char *)param_struct + item->off);
|
||||
LogFullDebug(COMPONENT_CONFIG,
|
||||
"%p name=%s type=%s",
|
||||
param_addr, item->name, config_type_str(item->type));
|
||||
@@ -970,7 +970,7 @@
|
||||
struct config_error_type *err_type)
|
||||
{
|
||||
struct config_item *item;
|
||||
- caddr_t *param_addr;
|
||||
+ void *param_addr;
|
||||
struct config_node *node, *term_node, *next_node = NULL;
|
||||
struct glist_head *ns;
|
||||
int errors = 0;
|
||||
@@ -1002,8 +1002,7 @@
|
||||
node = next_node;
|
||||
continue;
|
||||
}
|
||||
- param_addr = (caddr_t *)((uint64_t)param_struct
|
||||
- + item->off);
|
||||
+ param_addr = ((char *)param_struct + item->off);
|
||||
LogFullDebug(COMPONENT_CONFIG,
|
||||
"%p name=%s type=%s",
|
||||
param_addr, item->name,
|
||||
@@ -1051,10 +1050,9 @@
|
||||
&num64, err_type)) {
|
||||
*(int32_t *)param_addr = num64;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
-
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.i32.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.i32.bit;
|
||||
@@ -1081,10 +1079,9 @@
|
||||
&num64, err_type)) {
|
||||
*(uid_t *)param_addr = num64;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
-
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.i64.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.i64.bit;
|
||||
@@ -1095,9 +1092,9 @@
|
||||
if (convert_fsid(term_node, param_addr,
|
||||
err_type)) {
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.fsid.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.fsid.bit;
|
||||
@@ -1137,9 +1134,9 @@
|
||||
*(uint32_t *)param_addr
|
||||
&= ~item->u.bit.bit;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.bit.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.bit.bit;
|
||||
@@ -1155,9 +1152,9 @@
|
||||
err_type)) {
|
||||
*(uint32_t *)param_addr |= num32;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.lst.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.lst.mask;
|
||||
@@ -1180,9 +1177,9 @@
|
||||
err_type)) {
|
||||
*(uint32_t *)param_addr |= num32;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.lst.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.lst.mask;
|
||||
@@ -1204,9 +1201,9 @@
|
||||
err_type)) {
|
||||
*(uint32_t *)param_addr |= num32;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.lst.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.lst.bit;
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/common_pnfs.c.orig 2015-09-10 12:48:43.434344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/common_pnfs.c 2015-09-10 12:49:28.695344661 -0400
|
||||
@@ -291,7 +291,7 @@
|
||||
*(ds_ids + i),
|
||||
&handle);
|
||||
if (nfs_status != NFS4_OK) {
|
||||
- LogMajor(COMPONENT_PNFS, "Failed converting FH %lu.",
|
||||
+ LogMajor(COMPONENT_PNFS, "Failed converting FH %zu.",
|
||||
i);
|
||||
return nfs_status;
|
||||
}
|
||||
@@ -300,7 +300,7 @@
|
||||
(char **)&handle.nfs_fh4_val,
|
||||
&handle.nfs_fh4_len,
|
||||
handle.nfs_fh4_len)) {
|
||||
- LogMajor(COMPONENT_PNFS, "Failed encoding FH %lu.", i);
|
||||
+ LogMajor(COMPONENT_PNFS, "Failed encoding FH %zu.", i);
|
||||
return NFS4ERR_SERVERFAULT;
|
||||
}
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/export.c.orig 2015-09-10 11:41:29.614344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/export.c 2015-09-10 11:42:04.125344661 -0400
|
||||
@@ -212,7 +212,7 @@
|
||||
fh_size = GLAPI_HANDLE_LENGTH;
|
||||
if (fh_desc->len != fh_size) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Size mismatch for handle. should be %lu, got %lu",
|
||||
+ "Size mismatch for handle. should be %zu, got %zu",
|
||||
fh_size, fh_desc->len);
|
||||
return fsalstat(ERR_FSAL_SERVERFAULT, 0);
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/handle.c.orig 2015-09-10 11:43:46.414344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/handle.c 2015-09-10 11:51:17.085344661 -0400
|
||||
@@ -1248,7 +1248,7 @@
|
||||
*/
|
||||
if (flock.l_len < 0) {
|
||||
LogCrit(COMPONENT_FSAL,
|
||||
- "The requested lock length is out of range- flock.l_len(%ld), request_lock_length(%lu)",
|
||||
+ "The requested lock length is out of range- flock.l_len(%" PRIi64 "), request_lock_length(%" PRIu64 ")",
|
||||
flock.l_len, request_lock->lock_length);
|
||||
status.major = ERR_FSAL_BAD_RANGE;
|
||||
goto out;
|
||||
@@ -1515,7 +1515,7 @@
|
||||
fh_size = GLAPI_HANDLE_LENGTH;
|
||||
if (fh_desc->len < fh_size) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Space too small for handle. need %lu, have %lu",
|
||||
+ "Space too small for handle. need %zu, have %zu",
|
||||
fh_size, fh_desc->len);
|
||||
status.major = ERR_FSAL_TOOSMALL;
|
||||
goto out;
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/posix_acls.c.orig 2015-09-10 07:59:08.715344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/posix_acls.c 2015-09-10 07:59:46.368344661 -0400
|
||||
@@ -471,7 +471,7 @@
|
||||
acl_t allow_acl, deny_acl;
|
||||
acl_entry_t a_entry, d_entry;
|
||||
acl_permset_t a_permset, e_a_permset, d_permset, e_d_permset;
|
||||
- acl_tag_t tag;
|
||||
+ acl_tag_t tag = -1;
|
||||
char *acl_str;
|
||||
unsigned int id;
|
||||
bool mask = false;
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PROXY/handle.c.orig 2015-09-10 11:12:37.781344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PROXY/handle.c 2015-09-10 12:37:29.215344661 -0400
|
||||
@@ -907,7 +907,7 @@
|
||||
|
||||
if (!needed && pxy_rpc_renewer_wait(lease_time - 5)) {
|
||||
/* Simply renew the client id you've got */
|
||||
- LogDebug(COMPONENT_FSAL, "Renewing client id %lx",
|
||||
+ LogDebug(COMPONENT_FSAL, "Renewing client id %" PRIx64,
|
||||
pxy_clientid);
|
||||
arg.argop = NFS4_OP_RENEW;
|
||||
arg.nfs_argop4_u.oprenew.clientid = pxy_clientid;
|
||||
@@ -915,7 +915,7 @@
|
||||
&res);
|
||||
if (rc == NFS4_OK) {
|
||||
LogDebug(COMPONENT_FSAL,
|
||||
- "Renewed client id %lx", pxy_clientid);
|
||||
+ "Renewed client id %" PRIx64, pxy_clientid);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -2223,7 +2223,7 @@
|
||||
#endif
|
||||
if (fh_desc->len != fh_size) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Size mismatch for handle. should be %lu, got %lu",
|
||||
+ "Size mismatch for handle. should be %zu, got %zu",
|
||||
fh_size, fh_desc->len);
|
||||
return fsalstat(ERR_FSAL_SERVERFAULT, 0);
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PSEUDO/export.c.orig 2015-09-10 12:30:54.996344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PSEUDO/export.c 2015-09-10 12:31:21.319344661 -0400
|
||||
@@ -253,7 +253,7 @@
|
||||
|
||||
if (fh_desc->len < fh_min) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Size mismatch for handle. should be >= %lu, got %lu",
|
||||
+ "Size mismatch for handle. should be >= %zu, got %zu",
|
||||
fh_min, fh_desc->len);
|
||||
return fsalstat(ERR_FSAL_SERVERFAULT, 0);
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PSEUDO/handle.c.orig 2015-09-10 11:05:27.445344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PSEUDO/handle.c 2015-09-10 12:22:02.934344661 -0400
|
||||
@@ -675,8 +675,9 @@
|
||||
case FSAL_DIGEST_NFSV4:
|
||||
if (fh_desc->len < V4_FH_OPAQUE_SIZE) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Space too small for handle. need %lu, have %lu",
|
||||
- V4_FH_OPAQUE_SIZE, fh_desc->len);
|
||||
+ "Space too small for handle. need %lu, have %zu",
|
||||
+ ((unsigned long) V4_FH_OPAQUE_SIZE),
|
||||
+ fh_desc->len);
|
||||
return fsalstat(ERR_FSAL_TOOSMALL, 0);
|
||||
}
|
||||
|
||||
@@ -850,9 +851,9 @@
|
||||
|
||||
if (hdl_desc->len != V4_FH_OPAQUE_SIZE) {
|
||||
LogCrit(COMPONENT_FSAL,
|
||||
- "Invalid handle size %lu expected %zu",
|
||||
+ "Invalid handle size %zu expected %lu",
|
||||
hdl_desc->len,
|
||||
- V4_FH_OPAQUE_SIZE);
|
||||
+ ((unsigned long) V4_FH_OPAQUE_SIZE));
|
||||
|
||||
return fsalstat(ERR_FSAL_BADHANDLE, 0);
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_VFS/file.c.orig 2015-09-10 11:56:58.263344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_VFS/file.c 2015-09-10 11:58:01.350344661 -0400
|
||||
@@ -297,7 +297,7 @@
|
||||
goto out;
|
||||
}
|
||||
LogFullDebug(COMPONENT_FSAL,
|
||||
- "Locking: op:%d type:%d start:%" PRIu64 " length:%lu ",
|
||||
+ "Locking: op:%d type:%d start:%" PRIu64 " length:%" PRIu64,
|
||||
lock_op, request_lock->lock_type, request_lock->lock_start,
|
||||
request_lock->lock_length);
|
||||
if (lock_op == FSAL_OP_LOCKT) {
|
||||
@@ -336,7 +336,7 @@
|
||||
*/
|
||||
if (lock_args.l_len < 0) {
|
||||
LogCrit(COMPONENT_FSAL,
|
||||
- "The requested lock length is out of range- lock_args.l_len(%ld), request_lock_length(%lu)",
|
||||
+ "The requested lock length is out of range- lock_args.l_len(%ld), request_lock_length(%" PRIu64 ")",
|
||||
lock_args.l_len, request_lock->lock_length);
|
||||
fsal_error = ERR_FSAL_BAD_RANGE;
|
||||
goto out;
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_VFS/handle.c.orig 2015-09-10 11:53:08.591344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_VFS/handle.c 2015-09-10 11:54:21.005344661 -0400
|
||||
@@ -1711,8 +1711,8 @@
|
||||
case FSAL_DIGEST_NFSV4:
|
||||
if (fh_desc->len < myself->handle->handle_len) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Space too small for handle. need %d, have %lu",
|
||||
- (int) myself->handle->handle_len,
|
||||
+ "Space too small for handle. need %u, have %zu",
|
||||
+ myself->handle->handle_len,
|
||||
fh_desc->len);
|
||||
return fsalstat(ERR_FSAL_TOOSMALL, 0);
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/MainNFSD/nfs_init.c.orig 2015-09-10 09:30:35.696344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/MainNFSD/nfs_init.c 2015-09-10 09:31:35.054344661 -0400
|
||||
@@ -196,12 +196,12 @@
|
||||
printf("\tDRC_UDP_Checksum = %u ;\n",
|
||||
nfs_param.core_param.drc.udp.checksum);
|
||||
printf("\tDecoder_Fridge_Expiration_Delay = %" PRIu64 " ;\n",
|
||||
- nfs_param.core_param.decoder_fridge_expiration_delay);
|
||||
+ ((uint64_t) nfs_param.core_param.decoder_fridge_expiration_delay));
|
||||
printf("\tDecoder_Fridge_Block_Timeout = %" PRIu64 " ;\n",
|
||||
- nfs_param.core_param.decoder_fridge_block_timeout);
|
||||
+ ((uint64_t) nfs_param.core_param.decoder_fridge_block_timeout));
|
||||
|
||||
printf("\tManage_Gids_Expiration = %" PRIu64 " ;\n",
|
||||
- nfs_param.core_param.manage_gids_expiration);
|
||||
+ ((uint64_t) nfs_param.core_param.manage_gids_expiration));
|
||||
|
||||
if (nfs_param.core_param.drop_io_errors)
|
||||
printf("\tDrop_IO_Errors = true ;\n");
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/9P/9p_xattrwalk.c.orig 2015-09-10 11:22:58.239344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/9P/9p_xattrwalk.c 2015-09-10 11:24:26.539344661 -0400
|
||||
@@ -56,7 +56,7 @@
|
||||
u32 *attrfid = NULL;
|
||||
u16 *name_len;
|
||||
char *name_str;
|
||||
- u64 attrsize = 0LL;
|
||||
+ size_t attrsize = 0;
|
||||
|
||||
fsal_status_t fsal_status;
|
||||
char name[MAXNAMLEN];
|
||||
@@ -152,7 +152,7 @@
|
||||
}
|
||||
|
||||
xattr_cursor = pxattrfid->specdata.xattr.xattr_content;
|
||||
- attrsize = 0LL;
|
||||
+ attrsize = 0;
|
||||
for (i = 0; i < nb_xattrs_read; i++) {
|
||||
tmplen =
|
||||
snprintf(xattr_cursor, MAXNAMLEN, "%s",
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_fsstat.c.orig 2015-09-10 10:33:35.075344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_fsstat.c 2015-09-10 10:36:27.213344661 -0400
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
if (cache_status == CACHE_INODE_SUCCESS) {
|
||||
LogFullDebug(COMPONENT_NFSPROTO,
|
||||
- "nfs_Fsstat --> dynamicinfo.total_bytes=%zu dynamicinfo.free_bytes=%zu dynamicinfo.avail_bytes=%zu",
|
||||
+ "nfs_Fsstat --> dynamicinfo.total_bytes=%" PRIu64 " dynamicinfo.free_bytes=%" PRIu64 " dynamicinfo.avail_bytes=%" PRIu64,
|
||||
dynamicinfo.total_bytes, dynamicinfo.free_bytes,
|
||||
dynamicinfo.avail_bytes);
|
||||
LogFullDebug(COMPONENT_NFSPROTO,
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_read.c.orig 2015-09-10 10:44:30.812344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_read.c 2015-09-10 10:46:25.586344661 -0400
|
||||
@@ -106,7 +106,7 @@
|
||||
nfs_FhandleToStr(req->rq_vers, &arg->arg_read3.file, NULL, str);
|
||||
LogDebug(COMPONENT_NFSPROTO,
|
||||
"REQUEST PROCESSING: Calling nfs_Read handle: %s start: %"
|
||||
- PRIu64 " len: %" PRIu64,
|
||||
+ PRIu64 " len: %zu",
|
||||
str, offset, size);
|
||||
}
|
||||
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_write.c.orig 2015-09-10 10:52:26.791344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_write.c 2015-09-10 10:55:23.321344661 -0400
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
LogDebug(COMPONENT_NFSPROTO,
|
||||
"REQUEST PROCESSING: Calling nfs_Write handle: %s start: %"
|
||||
- PRIx64 " len: %" PRIx64 " %s",
|
||||
+ PRIx64 " len: %zx %s",
|
||||
str, offset, size, stables);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
/* Do not exceed maxium WRITE offset if set */
|
||||
if (op_ctx->export->MaxOffsetWrite < UINT64_MAX) {
|
||||
LogFullDebug(COMPONENT_NFSPROTO,
|
||||
- "Write offset=%" PRIu64 " count=%" PRIu64
|
||||
+ "Write offset=%" PRIu64 " size=%zu"
|
||||
" MaxOffSet=%" PRIu64, offset, size,
|
||||
op_ctx->export->MaxOffsetWrite);
|
||||
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs4_op_layoutget.c.orig 2015-09-10 11:27:03.276344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs4_op_layoutget.c 2015-09-10 11:30:09.100344661 -0400
|
||||
@@ -547,7 +547,7 @@
|
||||
nfsstat4 nfs_status = 0;
|
||||
|
||||
LogEvent(COMPONENT_PNFS,
|
||||
- "LAYOUTERROR OP %d status %d offset: %lu length: %lu",
|
||||
+ "LAYOUTERROR OP %d status %d offset: %" PRIu64 " length: %" PRIu64,
|
||||
arg_LAYOUTERROR4->lea_errors.de_opnum,
|
||||
arg_LAYOUTERROR4->lea_errors.de_status,
|
||||
arg_LAYOUTERROR4->lea_offset,
|
||||
@@ -577,12 +577,12 @@
|
||||
nfsstat4 nfs_status = 0;
|
||||
|
||||
LogEvent(COMPONENT_PNFS,
|
||||
- "LAYOUTSTATS offset %lu length %lu",
|
||||
+ "LAYOUTSTATS offset %" PRIu64 " length %" PRIu64,
|
||||
arg_LAYOUTSTATS4->lsa_offset,
|
||||
arg_LAYOUTSTATS4->lsa_length);
|
||||
|
||||
LogEvent(COMPONENT_PNFS,
|
||||
- "LAYOUTSTATS read count %u bytes %lu write count %u bytes %lu",
|
||||
+ "LAYOUTSTATS read count %u bytes %" PRIu64 " write count %u bytes %" PRIu64,
|
||||
arg_LAYOUTSTATS4->lsa_read.ii_count,
|
||||
arg_LAYOUTSTATS4->lsa_read.ii_bytes,
|
||||
arg_LAYOUTSTATS4->lsa_write.ii_count,
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs4_op_read.c.orig 2015-09-10 11:35:03.095344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs4_op_read.c 2015-09-10 12:33:31.070344661 -0400
|
||||
@@ -418,7 +418,7 @@
|
||||
if (op_ctx->export->MaxOffsetRead < UINT64_MAX) {
|
||||
LogFullDebug(COMPONENT_NFS_V4,
|
||||
"Read offset=%" PRIu64
|
||||
- " count=%zd MaxOffSet=%" PRIu64,
|
||||
+ " size=%" PRIu64 " MaxOffSet=%" PRIu64,
|
||||
offset, size,
|
||||
op_ctx->export->MaxOffsetRead);
|
||||
|
||||
@@ -710,7 +710,7 @@
|
||||
}
|
||||
done:
|
||||
LogDebug(COMPONENT_NFS_V4,
|
||||
- "Status %s hints 0x%X offset %ld count %ld ",
|
||||
+ "Status %s hints 0x%X offset %" PRIu64 " count %" PRIu64,
|
||||
nfsstat4_to_str(res_IO_ADVISE->iaa_status),
|
||||
hints.hints, hints.offset, hints.count);
|
||||
|
||||
@@ -792,7 +792,7 @@
|
||||
}
|
||||
done:
|
||||
LogDebug(COMPONENT_NFS_V4,
|
||||
- "Status %s type %d offset %ld ",
|
||||
+ "Status %s type %d offset %" PRIu64,
|
||||
nfsstat4_to_str(res_SEEK->sr_status), arg_SEEK->sa_what,
|
||||
arg_SEEK->sa_offset);
|
||||
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs_proto_tools.c.orig 2015-09-10 12:34:47.664344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs_proto_tools.c 2015-09-10 12:35:56.368344661 -0400
|
||||
@@ -3715,7 +3715,7 @@
|
||||
nfs3_FSALattr_To_PartialFattr(FSAL_attr, &got, Fattr);
|
||||
if (want & ~got) {
|
||||
LogCrit(COMPONENT_NFSPROTO,
|
||||
- "Likely bug: FSAL did not fill in a standard NFSv3 attribute: missing %lx",
|
||||
+ "Likely bug: FSAL did not fill in a standard NFSv3 attribute: missing %" PRIx64,
|
||||
want & ~got);
|
||||
}
|
||||
|
||||
@@ -4206,6 +4206,6 @@
|
||||
if (!(attr->mode & S_ISVTX))
|
||||
return false;
|
||||
|
||||
- LogDebug(COMPONENT_NFS_V4, "sticky bit is set on %ld", attr->fileid);
|
||||
+ LogDebug(COMPONENT_NFS_V4, "sticky bit is set on %" PRIi64, attr->fileid);
|
||||
return true;
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/SAL/nfs4_recovery.c.orig 2015-09-10 10:14:22.739344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/SAL/nfs4_recovery.c 2015-09-10 10:29:20.513344661 -0400
|
||||
@@ -66,8 +66,6 @@
|
||||
*/
|
||||
void nfs4_start_grace(nfs_grace_start_t *gsp)
|
||||
{
|
||||
- time_t current_time;
|
||||
-
|
||||
if (nfs_param.nfsv4_param.graceless) {
|
||||
LogEvent(COMPONENT_STATE,
|
||||
"NFS Server skipping GRACE (Graceless is true)");
|
||||
@@ -81,8 +79,7 @@
|
||||
* seconds Lease_Lifetime should be set to a smaller value for those
|
||||
* setups.
|
||||
*/
|
||||
- current_time = time(NULL);
|
||||
- atomic_store_uint64_t(¤t_grace, current_time);
|
||||
+ atomic_store_time_t(¤t_grace, time(NULL));
|
||||
|
||||
LogEvent(COMPONENT_STATE, "NFS Server Now IN GRACE, duration %d",
|
||||
(int)nfs_param.nfsv4_param.lease_lifetime);
|
||||
@@ -220,7 +217,7 @@
|
||||
PATH_MAX) > 0) {
|
||||
/* convert_opaque_value_max_for_dir does not prefix
|
||||
* the "(<length>:". So we need to do it here */
|
||||
- sprintf(cidstr_len, "%ld", strlen(cidstr));
|
||||
+ snprintf(cidstr_len, sizeof cidstr_len, "%zd", strlen(cidstr));
|
||||
total_len = strlen(cidstr) + strlen(str_client_addr) + 5 +
|
||||
strlen(cidstr_len);
|
||||
/* hold both long form clientid and IP */
|
||||
@@ -268,7 +265,7 @@
|
||||
PATH_MAX) > 0) {
|
||||
/* convert_opaque_value_max_for_dir does not prefix
|
||||
* the "(<length>:". So we need to do it here */
|
||||
- sprintf(cidstr_len, "%ld", strlen(cidstr));
|
||||
+ snprintf(cidstr_len, sizeof cidstr_len, "%zd", strlen(cidstr));
|
||||
total_len = strlen(cidstr) + strlen(buf) + 5 +
|
||||
strlen(cidstr_len);
|
||||
/* hold both long form clientid and IP */
|
||||
@@ -371,7 +368,7 @@
|
||||
dentp->d_name[0] != '\x1') {
|
||||
continue;
|
||||
}
|
||||
- sprintf(del_path, "%s/%s", path, dentp->d_name);
|
||||
+ snprintf(del_path, sizeof del_path, "%s/%s", path, dentp->d_name);
|
||||
if (unlink(del_path) < 0) {
|
||||
LogEvent(COMPONENT_CLIENTID,
|
||||
"unlink of %s failed errno: %d",
|
||||
@@ -576,7 +573,7 @@
|
||||
char lopath[PATH_MAX];
|
||||
int fd;
|
||||
|
||||
- sprintf(lopath, "%s/", tgtdir);
|
||||
+ snprintf(lopath, sizeof lopath, "%s/", tgtdir);
|
||||
strncat(lopath, dentp->d_name, strlen(dentp->d_name));
|
||||
fd = creat(lopath, 0700);
|
||||
if (fd < 0) {
|
||||
@@ -613,7 +610,7 @@
|
||||
if (del) {
|
||||
char del_path[PATH_MAX];
|
||||
|
||||
- sprintf(del_path, "%s/%s", path, dentp->d_name);
|
||||
+ snprintf(del_path, sizeof del_path, "%s/%s", path, dentp->d_name);
|
||||
if (unlink(del_path) < 0) {
|
||||
LogEvent(COMPONENT_CLIENTID,
|
||||
"unlink of %s failed errno: %d",
|
||||
@@ -1018,7 +1015,7 @@
|
||||
if (dentp->d_name[0] == '\x1') {
|
||||
char del_path[PATH_MAX];
|
||||
|
||||
- sprintf(del_path, "%s/%s", parent_path, dentp->d_name);
|
||||
+ snprintf(del_path, sizeof del_path, "%s/%s", parent_path, dentp->d_name);
|
||||
if (unlink(del_path) < 0) {
|
||||
LogEvent(COMPONENT_CLIENTID,
|
||||
"unlink of %s failed errno: %d",
|
||||
--- nfs-ganesha-2.3-rc1/src/SAL/nfs4_state_id.c.orig 2015-09-10 09:51:49.633344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/SAL/nfs4_state_id.c 2015-09-10 10:08:58.896344661 -0400
|
||||
@@ -365,8 +365,7 @@
|
||||
res = ((uint32_t) pkey->state_owner->so_owner.so_nfs4_owner.so_clientid
|
||||
+ (uint32_t) sum + pkey->state_owner->so_owner_len
|
||||
+ (uint32_t) pkey->state_owner->so_type
|
||||
- + (uint32_t) (uint64_t) pkey->state_entry)
|
||||
- % (uint32_t) hparam->index_size;
|
||||
+ + ((uintptr_t) pkey->state_entry)) % (uint32_t) hparam->index_size;
|
||||
|
||||
if (isDebug(COMPONENT_HASHTABLE))
|
||||
LogFullDebug(COMPONENT_STATE, "value = %" PRIu32, res);
|
||||
@@ -401,7 +400,7 @@
|
||||
res = (uint64_t) pkey->state_owner->so_owner.so_nfs4_owner.so_clientid
|
||||
+ (uint64_t) sum + pkey->state_owner->so_owner_len
|
||||
+ (uint64_t) pkey->state_owner->so_type
|
||||
- + (uint64_t) pkey->state_entry;
|
||||
+ + (uintptr_t) pkey->state_entry;
|
||||
|
||||
if (isDebug(COMPONENT_HASHTABLE))
|
||||
LogFullDebug(COMPONENT_STATE, "rbt = %" PRIu64, res);
|
||||
--- nfs-ganesha-2.3-rc1/src/support/exports.c.orig 2015-09-10 11:19:42.941344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/support/exports.c 2015-09-10 11:20:44.579344661 -0400
|
||||
@@ -818,7 +818,7 @@
|
||||
export->fullpath, export->FS_tag, perms);
|
||||
|
||||
LogInfo(COMPONENT_CONFIG,
|
||||
- "Export %d has %ld defined clients", export->export_id,
|
||||
+ "Export %d has %zd defined clients", export->export_id,
|
||||
glist_length(&export->clients));
|
||||
put_gsh_export(export);
|
||||
return 0;
|
@ -1,684 +0,0 @@
|
||||
--- nfs-ganesha-2.3-rc1/src/cache_inode/cache_inode_avl.c.orig 2015-09-10 09:39:55.666344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/cache_inode/cache_inode_avl.c 2015-09-10 09:45:02.850344661 -0400
|
||||
@@ -234,7 +234,7 @@
|
||||
/* tmp hook : it seems like client running v9fs dislike "negative"
|
||||
* cookies just kill the sign bit, making
|
||||
* cookies 63 bits... */
|
||||
- v->hk.k &= ~(1L << 63);
|
||||
+ v->hk.k &= ~(1ULL << 63);
|
||||
#endif
|
||||
|
||||
/* XXX would we really wait for UINT64_MAX? if not, how many
|
||||
@@ -259,7 +259,7 @@
|
||||
#ifdef _USE_9P
|
||||
/* tmp hook : it seems like client running v9fs dislike "negative"
|
||||
* cookies */
|
||||
- v->hk.k &= ~(1L << 63);
|
||||
+ v->hk.k &= ~(1ULL << 63);
|
||||
#endif
|
||||
for (j2 = 1 /* tried j=0 */; j2 < UINT64_MAX; j2++) {
|
||||
v->hk.k = v->hk.k + j2;
|
||||
@@ -346,7 +346,7 @@
|
||||
#ifdef _USE_9P
|
||||
/* tmp hook : it seems like client running v9fs dislike "negative"
|
||||
* cookies */
|
||||
- v.hk.k &= ~(1L << 63);
|
||||
+ v.hk.k &= ~(1ULL << 63);
|
||||
#endif
|
||||
|
||||
for (j = 0; j < maxj; j++) {
|
||||
--- nfs-ganesha-2.3-rc1/src/cache_inode/cache_inode_lru.c.orig 2015-09-10 09:07:18.903344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/cache_inode/cache_inode_lru.c 2015-09-10 09:24:01.710344661 -0400
|
||||
@@ -708,7 +708,7 @@
|
||||
lru_state.futility = 0;
|
||||
}
|
||||
|
||||
- LogFullDebug(COMPONENT_CACHE_INODE_LRU, "lru entries: %zu",
|
||||
+ LogFullDebug(COMPONENT_CACHE_INODE_LRU, "lru entries: %" PRIu64,
|
||||
lru_state.entries_used);
|
||||
|
||||
/* Reap file descriptors. This is a preliminary example of the
|
||||
@@ -745,7 +745,7 @@
|
||||
LogFullDebug(COMPONENT_CACHE_INODE_LRU,
|
||||
"fdrate:%u fdcount:%zd slept for %" PRIu64 " sec",
|
||||
fdratepersec, formeropen,
|
||||
- curr_time - lru_state.prev_time);
|
||||
+ ((uint64_t) (curr_time - lru_state.prev_time)));
|
||||
|
||||
if (extremis) {
|
||||
LogDebug(COMPONENT_CACHE_INODE_LRU,
|
||||
@@ -925,7 +925,8 @@
|
||||
"After work, open_fd_count:%zd count:%" PRIu64
|
||||
" fdrate:%u threadwait=%" PRIu64,
|
||||
atomic_fetch_size_t(&open_fd_count),
|
||||
- lru_state.entries_used, fdratepersec, threadwait);
|
||||
+ lru_state.entries_used, fdratepersec,
|
||||
+ ((uint64_t) threadwait));
|
||||
LogFullDebug(COMPONENT_CACHE_INODE_LRU,
|
||||
"currentopen=%zd futility=%d totalwork=%zd biggest_window=%d extremis=%d lanes=%d fds_lowat=%d ",
|
||||
currentopen, lru_state.futility, totalwork,
|
||||
--- nfs-ganesha-2.3-rc2/src/CMakeLists.txt.orig 2015-09-11 19:01:01.530344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc2/src/CMakeLists.txt 2015-09-11 19:05:13.269344661 -0400
|
||||
@@ -765,9 +765,12 @@
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/portability_cmake_2.8 /usr/share/cmake/Modules ${CMAKE_MODULE_PATH})
|
||||
endif( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8" )
|
||||
|
||||
+find_library(LIBNTIRPC ntirpc)
|
||||
+
|
||||
+set(CMAKE_C_FLAGS "-isystem /usr/include/ntirpc ${CMAKE_C_FLAGS}")
|
||||
+
|
||||
include_directories(
|
||||
"${PROJECT_BINARY_DIR}/include"
|
||||
- "${PROJECT_SOURCE_DIR}/libntirpc/ntirpc/"
|
||||
"${PROJECT_SOURCE_DIR}/include"
|
||||
"${OS_INCLUDE_DIR}"
|
||||
"${KRB5_INCLUDE_DIRS}"
|
||||
@@ -783,12 +786,6 @@
|
||||
|
||||
|
||||
#callers add:
|
||||
-# target_link_libraries(your_library ${LIBTIRPC_LIBRARIES})
|
||||
-set(LIBTIRPC_INCLUDE_DIR
|
||||
- "${PROJECT_BINARY_DIR}/libtirpc/ntirpc"
|
||||
- "${PROJECT_BINARY_DIR}/libtirpc/ntirpc/rpc"
|
||||
-)
|
||||
-set(LIBTIRPC_LIBRARIES ntirpc)
|
||||
|
||||
# Find misc system libs
|
||||
find_library(LIBRT rt) # extended Pthreads functions
|
||||
@@ -916,6 +913,7 @@
|
||||
${KRB5_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${LIBRT}
|
||||
+ ${LIBNTIRPC}
|
||||
)
|
||||
|
||||
# Config file; make sure it doesn't clobber an existing one
|
||||
@@ -926,16 +924,6 @@
|
||||
# pre-create PREFIX/var/run/ganesha
|
||||
install(DIRECTORY DESTINATION ${SYSSTATEDIR}/run/ganesha)
|
||||
|
||||
-IF( NOT EXISTS ${PROJECT_SOURCE_DIR}/libntirpc/ganesha/CMakeLists.txt )
|
||||
-message( FATAL_ERROR
|
||||
-"No CMakeLists.txt found in libntirpc
|
||||
-This probably means that the directory was not properly populated.
|
||||
-Please run the following command to do that and use cmake again:
|
||||
- git submodule update --init
|
||||
-Alternatively, if you are not using git, get the current version at
|
||||
- https://github.com/nfs-ganesha/ntirpc" )
|
||||
-ENDIF( NOT EXISTS ${PROJECT_SOURCE_DIR}/libntirpc/ganesha/CMakeLists.txt )
|
||||
-
|
||||
add_subdirectory(log)
|
||||
add_subdirectory(config_parsing)
|
||||
add_subdirectory(cidr)
|
||||
@@ -945,7 +933,6 @@
|
||||
add_subdirectory(NodeList)
|
||||
add_subdirectory(cache_inode)
|
||||
add_subdirectory(SAL)
|
||||
-add_subdirectory(libntirpc/ganesha)
|
||||
add_subdirectory(RPCAL)
|
||||
add_subdirectory(Protocols)
|
||||
add_subdirectory(support)
|
||||
--- nfs-ganesha-2.3-rc1/src/config_parsing/analyse.c.orig 2015-09-10 08:23:22.091344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/config_parsing/analyse.c 2015-09-10 08:25:12.379344661 -0400
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
assert(tree->root.type == TYPE_ROOT);
|
||||
fprintf(output, "<SUMMARY>\n");
|
||||
- fprintf(output, " <BLOCK_COUNT> %ld </BLOCKCOUNT>\n",
|
||||
+ fprintf(output, " <BLOCK_COUNT> %zd </BLOCKCOUNT>\n",
|
||||
glist_length(&tree->root.u.nterm.sub_nodes));
|
||||
fprintf(output, " <CONFIGURATION_FILES>\n");
|
||||
for (file = tree->files; file != NULL; file = file->next)
|
||||
--- nfs-ganesha-2.3-rc1/src/config_parsing/config_parsing.c.orig 2015-09-10 08:41:39.615344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/config_parsing/config_parsing.c 2015-09-10 09:01:37.684344661 -0400
|
||||
@@ -758,13 +758,13 @@
|
||||
struct config_error_type *err_type)
|
||||
{
|
||||
struct config_item *item;
|
||||
- caddr_t *param_addr;
|
||||
+ void *param_addr;
|
||||
sockaddr_t *sock;
|
||||
int rc;
|
||||
int errors = 0;
|
||||
|
||||
for (item = params; item->name != NULL; item++) {
|
||||
- param_addr = (caddr_t *)((uint64_t)param_struct + item->off);
|
||||
+ param_addr = ((char *)param_struct + item->off);
|
||||
LogFullDebug(COMPONENT_CONFIG,
|
||||
"%p name=%s type=%s",
|
||||
param_addr, item->name, config_type_str(item->type));
|
||||
@@ -970,7 +970,7 @@
|
||||
struct config_error_type *err_type)
|
||||
{
|
||||
struct config_item *item;
|
||||
- caddr_t *param_addr;
|
||||
+ void *param_addr;
|
||||
struct config_node *node, *term_node, *next_node = NULL;
|
||||
struct glist_head *ns;
|
||||
int errors = 0;
|
||||
@@ -1002,8 +1002,7 @@
|
||||
node = next_node;
|
||||
continue;
|
||||
}
|
||||
- param_addr = (caddr_t *)((uint64_t)param_struct
|
||||
- + item->off);
|
||||
+ param_addr = ((char *)param_struct + item->off);
|
||||
LogFullDebug(COMPONENT_CONFIG,
|
||||
"%p name=%s type=%s",
|
||||
param_addr, item->name,
|
||||
@@ -1051,10 +1050,9 @@
|
||||
&num64, err_type)) {
|
||||
*(int32_t *)param_addr = num64;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
-
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.i32.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.i32.bit;
|
||||
@@ -1081,10 +1079,9 @@
|
||||
&num64, err_type)) {
|
||||
*(uid_t *)param_addr = num64;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
-
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.i64.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.i64.bit;
|
||||
@@ -1095,9 +1092,9 @@
|
||||
if (convert_fsid(term_node, param_addr,
|
||||
err_type)) {
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.fsid.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.fsid.bit;
|
||||
@@ -1137,9 +1134,9 @@
|
||||
*(uint32_t *)param_addr
|
||||
&= ~item->u.bit.bit;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.bit.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.bit.bit;
|
||||
@@ -1155,9 +1152,9 @@
|
||||
err_type)) {
|
||||
*(uint32_t *)param_addr |= num32;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.lst.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.lst.mask;
|
||||
@@ -1180,9 +1177,9 @@
|
||||
err_type)) {
|
||||
*(uint32_t *)param_addr |= num32;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.lst.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.lst.mask;
|
||||
@@ -1204,9 +1201,9 @@
|
||||
err_type)) {
|
||||
*(uint32_t *)param_addr |= num32;
|
||||
if (item->flags & CONFIG_MARK_SET) {
|
||||
- caddr_t *mask_addr;
|
||||
- mask_addr = (caddr_t *)
|
||||
- ((uint64_t)param_struct
|
||||
+ void *mask_addr;
|
||||
+ mask_addr =
|
||||
+ ((char *)param_struct
|
||||
+ item->u.lst.set_off);
|
||||
*(uint32_t *)mask_addr
|
||||
|= item->u.lst.bit;
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/common_pnfs.c.orig 2015-09-10 12:48:43.434344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/common_pnfs.c 2015-09-10 12:49:28.695344661 -0400
|
||||
@@ -291,7 +291,7 @@
|
||||
*(ds_ids + i),
|
||||
&handle);
|
||||
if (nfs_status != NFS4_OK) {
|
||||
- LogMajor(COMPONENT_PNFS, "Failed converting FH %lu.",
|
||||
+ LogMajor(COMPONENT_PNFS, "Failed converting FH %zu.",
|
||||
i);
|
||||
return nfs_status;
|
||||
}
|
||||
@@ -300,7 +300,7 @@
|
||||
(char **)&handle.nfs_fh4_val,
|
||||
&handle.nfs_fh4_len,
|
||||
handle.nfs_fh4_len)) {
|
||||
- LogMajor(COMPONENT_PNFS, "Failed encoding FH %lu.", i);
|
||||
+ LogMajor(COMPONENT_PNFS, "Failed encoding FH %zu.", i);
|
||||
return NFS4ERR_SERVERFAULT;
|
||||
}
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/export.c.orig 2015-09-10 11:41:29.614344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/export.c 2015-09-10 11:42:04.125344661 -0400
|
||||
@@ -212,7 +212,7 @@
|
||||
fh_size = GLAPI_HANDLE_LENGTH;
|
||||
if (fh_desc->len != fh_size) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Size mismatch for handle. should be %lu, got %lu",
|
||||
+ "Size mismatch for handle. should be %zu, got %zu",
|
||||
fh_size, fh_desc->len);
|
||||
return fsalstat(ERR_FSAL_SERVERFAULT, 0);
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/handle.c.orig 2015-09-10 11:43:46.414344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/handle.c 2015-09-10 11:51:17.085344661 -0400
|
||||
@@ -1248,7 +1248,7 @@
|
||||
*/
|
||||
if (flock.l_len < 0) {
|
||||
LogCrit(COMPONENT_FSAL,
|
||||
- "The requested lock length is out of range- flock.l_len(%ld), request_lock_length(%lu)",
|
||||
+ "The requested lock length is out of range- flock.l_len(%" PRIi64 "), request_lock_length(%" PRIu64 ")",
|
||||
flock.l_len, request_lock->lock_length);
|
||||
status.major = ERR_FSAL_BAD_RANGE;
|
||||
goto out;
|
||||
@@ -1515,7 +1515,7 @@
|
||||
fh_size = GLAPI_HANDLE_LENGTH;
|
||||
if (fh_desc->len < fh_size) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Space too small for handle. need %lu, have %lu",
|
||||
+ "Space too small for handle. need %zu, have %zu",
|
||||
fh_size, fh_desc->len);
|
||||
status.major = ERR_FSAL_TOOSMALL;
|
||||
goto out;
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/posix_acls.c.orig 2015-09-10 07:59:08.715344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_GLUSTER/posix_acls.c 2015-09-10 07:59:46.368344661 -0400
|
||||
@@ -471,7 +471,7 @@
|
||||
acl_t allow_acl, deny_acl;
|
||||
acl_entry_t a_entry, d_entry;
|
||||
acl_permset_t a_permset, e_a_permset, d_permset, e_d_permset;
|
||||
- acl_tag_t tag;
|
||||
+ acl_tag_t tag = -1;
|
||||
char *acl_str;
|
||||
unsigned int id;
|
||||
bool mask = false;
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PROXY/handle.c.orig 2015-09-10 11:12:37.781344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PROXY/handle.c 2015-09-10 12:37:29.215344661 -0400
|
||||
@@ -907,7 +907,7 @@
|
||||
|
||||
if (!needed && pxy_rpc_renewer_wait(lease_time - 5)) {
|
||||
/* Simply renew the client id you've got */
|
||||
- LogDebug(COMPONENT_FSAL, "Renewing client id %lx",
|
||||
+ LogDebug(COMPONENT_FSAL, "Renewing client id %" PRIx64,
|
||||
pxy_clientid);
|
||||
arg.argop = NFS4_OP_RENEW;
|
||||
arg.nfs_argop4_u.oprenew.clientid = pxy_clientid;
|
||||
@@ -915,7 +915,7 @@
|
||||
&res);
|
||||
if (rc == NFS4_OK) {
|
||||
LogDebug(COMPONENT_FSAL,
|
||||
- "Renewed client id %lx", pxy_clientid);
|
||||
+ "Renewed client id %" PRIx64, pxy_clientid);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -2223,7 +2223,7 @@
|
||||
#endif
|
||||
if (fh_desc->len != fh_size) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Size mismatch for handle. should be %lu, got %lu",
|
||||
+ "Size mismatch for handle. should be %zu, got %zu",
|
||||
fh_size, fh_desc->len);
|
||||
return fsalstat(ERR_FSAL_SERVERFAULT, 0);
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PSEUDO/export.c.orig 2015-09-10 12:30:54.996344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PSEUDO/export.c 2015-09-10 12:31:21.319344661 -0400
|
||||
@@ -253,7 +253,7 @@
|
||||
|
||||
if (fh_desc->len < fh_min) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Size mismatch for handle. should be >= %lu, got %lu",
|
||||
+ "Size mismatch for handle. should be >= %zu, got %zu",
|
||||
fh_min, fh_desc->len);
|
||||
return fsalstat(ERR_FSAL_SERVERFAULT, 0);
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PSEUDO/handle.c.orig 2015-09-10 11:05:27.445344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_PSEUDO/handle.c 2015-09-10 12:22:02.934344661 -0400
|
||||
@@ -675,8 +675,9 @@
|
||||
case FSAL_DIGEST_NFSV4:
|
||||
if (fh_desc->len < V4_FH_OPAQUE_SIZE) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Space too small for handle. need %lu, have %lu",
|
||||
- V4_FH_OPAQUE_SIZE, fh_desc->len);
|
||||
+ "Space too small for handle. need %lu, have %zu",
|
||||
+ ((unsigned long) V4_FH_OPAQUE_SIZE),
|
||||
+ fh_desc->len);
|
||||
return fsalstat(ERR_FSAL_TOOSMALL, 0);
|
||||
}
|
||||
|
||||
@@ -850,9 +851,9 @@
|
||||
|
||||
if (hdl_desc->len != V4_FH_OPAQUE_SIZE) {
|
||||
LogCrit(COMPONENT_FSAL,
|
||||
- "Invalid handle size %lu expected %zu",
|
||||
+ "Invalid handle size %zu expected %lu",
|
||||
hdl_desc->len,
|
||||
- V4_FH_OPAQUE_SIZE);
|
||||
+ ((unsigned long) V4_FH_OPAQUE_SIZE));
|
||||
|
||||
return fsalstat(ERR_FSAL_BADHANDLE, 0);
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_VFS/file.c.orig 2015-09-10 11:56:58.263344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_VFS/file.c 2015-09-10 11:58:01.350344661 -0400
|
||||
@@ -297,7 +297,7 @@
|
||||
goto out;
|
||||
}
|
||||
LogFullDebug(COMPONENT_FSAL,
|
||||
- "Locking: op:%d type:%d start:%" PRIu64 " length:%lu ",
|
||||
+ "Locking: op:%d type:%d start:%" PRIu64 " length:%" PRIu64,
|
||||
lock_op, request_lock->lock_type, request_lock->lock_start,
|
||||
request_lock->lock_length);
|
||||
if (lock_op == FSAL_OP_LOCKT) {
|
||||
@@ -336,7 +336,7 @@
|
||||
*/
|
||||
if (lock_args.l_len < 0) {
|
||||
LogCrit(COMPONENT_FSAL,
|
||||
- "The requested lock length is out of range- lock_args.l_len(%ld), request_lock_length(%lu)",
|
||||
+ "The requested lock length is out of range- lock_args.l_len(%ld), request_lock_length(%" PRIu64 ")",
|
||||
lock_args.l_len, request_lock->lock_length);
|
||||
fsal_error = ERR_FSAL_BAD_RANGE;
|
||||
goto out;
|
||||
--- nfs-ganesha-2.3-rc1/src/FSAL/FSAL_VFS/handle.c.orig 2015-09-10 11:53:08.591344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/FSAL/FSAL_VFS/handle.c 2015-09-10 11:54:21.005344661 -0400
|
||||
@@ -1711,8 +1711,8 @@
|
||||
case FSAL_DIGEST_NFSV4:
|
||||
if (fh_desc->len < myself->handle->handle_len) {
|
||||
LogMajor(COMPONENT_FSAL,
|
||||
- "Space too small for handle. need %d, have %lu",
|
||||
- (int) myself->handle->handle_len,
|
||||
+ "Space too small for handle. need %u, have %zu",
|
||||
+ myself->handle->handle_len,
|
||||
fh_desc->len);
|
||||
return fsalstat(ERR_FSAL_TOOSMALL, 0);
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/MainNFSD/nfs_init.c.orig 2015-09-10 09:30:35.696344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/MainNFSD/nfs_init.c 2015-09-10 09:31:35.054344661 -0400
|
||||
@@ -196,12 +196,12 @@
|
||||
printf("\tDRC_UDP_Checksum = %u ;\n",
|
||||
nfs_param.core_param.drc.udp.checksum);
|
||||
printf("\tDecoder_Fridge_Expiration_Delay = %" PRIu64 " ;\n",
|
||||
- nfs_param.core_param.decoder_fridge_expiration_delay);
|
||||
+ ((uint64_t) nfs_param.core_param.decoder_fridge_expiration_delay));
|
||||
printf("\tDecoder_Fridge_Block_Timeout = %" PRIu64 " ;\n",
|
||||
- nfs_param.core_param.decoder_fridge_block_timeout);
|
||||
+ ((uint64_t) nfs_param.core_param.decoder_fridge_block_timeout));
|
||||
|
||||
printf("\tManage_Gids_Expiration = %" PRIu64 " ;\n",
|
||||
- nfs_param.core_param.manage_gids_expiration);
|
||||
+ ((uint64_t) nfs_param.core_param.manage_gids_expiration));
|
||||
|
||||
if (nfs_param.core_param.drop_io_errors)
|
||||
printf("\tDrop_IO_Errors = true ;\n");
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/9P/9p_xattrwalk.c.orig 2015-09-10 11:22:58.239344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/9P/9p_xattrwalk.c 2015-09-10 11:24:26.539344661 -0400
|
||||
@@ -56,7 +56,7 @@
|
||||
u32 *attrfid = NULL;
|
||||
u16 *name_len;
|
||||
char *name_str;
|
||||
- u64 attrsize = 0LL;
|
||||
+ size_t attrsize = 0;
|
||||
|
||||
fsal_status_t fsal_status;
|
||||
char name[MAXNAMLEN];
|
||||
@@ -152,7 +152,7 @@
|
||||
}
|
||||
|
||||
xattr_cursor = pxattrfid->specdata.xattr.xattr_content;
|
||||
- attrsize = 0LL;
|
||||
+ attrsize = 0;
|
||||
for (i = 0; i < nb_xattrs_read; i++) {
|
||||
tmplen =
|
||||
snprintf(xattr_cursor, MAXNAMLEN, "%s",
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_fsstat.c.orig 2015-09-10 10:33:35.075344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_fsstat.c 2015-09-10 10:36:27.213344661 -0400
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
if (cache_status == CACHE_INODE_SUCCESS) {
|
||||
LogFullDebug(COMPONENT_NFSPROTO,
|
||||
- "nfs_Fsstat --> dynamicinfo.total_bytes=%zu dynamicinfo.free_bytes=%zu dynamicinfo.avail_bytes=%zu",
|
||||
+ "nfs_Fsstat --> dynamicinfo.total_bytes=%" PRIu64 " dynamicinfo.free_bytes=%" PRIu64 " dynamicinfo.avail_bytes=%" PRIu64,
|
||||
dynamicinfo.total_bytes, dynamicinfo.free_bytes,
|
||||
dynamicinfo.avail_bytes);
|
||||
LogFullDebug(COMPONENT_NFSPROTO,
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_read.c.orig 2015-09-10 10:44:30.812344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_read.c 2015-09-10 10:46:25.586344661 -0400
|
||||
@@ -106,7 +106,7 @@
|
||||
nfs_FhandleToStr(req->rq_vers, &arg->arg_read3.file, NULL, str);
|
||||
LogDebug(COMPONENT_NFSPROTO,
|
||||
"REQUEST PROCESSING: Calling nfs_Read handle: %s start: %"
|
||||
- PRIu64 " len: %" PRIu64,
|
||||
+ PRIu64 " len: %zu",
|
||||
str, offset, size);
|
||||
}
|
||||
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_write.c.orig 2015-09-10 10:52:26.791344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs3_write.c 2015-09-10 10:55:23.321344661 -0400
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
LogDebug(COMPONENT_NFSPROTO,
|
||||
"REQUEST PROCESSING: Calling nfs_Write handle: %s start: %"
|
||||
- PRIx64 " len: %" PRIx64 " %s",
|
||||
+ PRIx64 " len: %zx %s",
|
||||
str, offset, size, stables);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
/* Do not exceed maxium WRITE offset if set */
|
||||
if (op_ctx->export->MaxOffsetWrite < UINT64_MAX) {
|
||||
LogFullDebug(COMPONENT_NFSPROTO,
|
||||
- "Write offset=%" PRIu64 " count=%" PRIu64
|
||||
+ "Write offset=%" PRIu64 " size=%zu"
|
||||
" MaxOffSet=%" PRIu64, offset, size,
|
||||
op_ctx->export->MaxOffsetWrite);
|
||||
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs4_op_layoutget.c.orig 2015-09-10 11:27:03.276344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs4_op_layoutget.c 2015-09-10 11:30:09.100344661 -0400
|
||||
@@ -547,7 +547,7 @@
|
||||
nfsstat4 nfs_status = 0;
|
||||
|
||||
LogEvent(COMPONENT_PNFS,
|
||||
- "LAYOUTERROR OP %d status %d offset: %lu length: %lu",
|
||||
+ "LAYOUTERROR OP %d status %d offset: %" PRIu64 " length: %" PRIu64,
|
||||
arg_LAYOUTERROR4->lea_errors.de_opnum,
|
||||
arg_LAYOUTERROR4->lea_errors.de_status,
|
||||
arg_LAYOUTERROR4->lea_offset,
|
||||
@@ -577,12 +577,12 @@
|
||||
nfsstat4 nfs_status = 0;
|
||||
|
||||
LogEvent(COMPONENT_PNFS,
|
||||
- "LAYOUTSTATS offset %lu length %lu",
|
||||
+ "LAYOUTSTATS offset %" PRIu64 " length %" PRIu64,
|
||||
arg_LAYOUTSTATS4->lsa_offset,
|
||||
arg_LAYOUTSTATS4->lsa_length);
|
||||
|
||||
LogEvent(COMPONENT_PNFS,
|
||||
- "LAYOUTSTATS read count %u bytes %lu write count %u bytes %lu",
|
||||
+ "LAYOUTSTATS read count %u bytes %" PRIu64 " write count %u bytes %" PRIu64,
|
||||
arg_LAYOUTSTATS4->lsa_read.ii_count,
|
||||
arg_LAYOUTSTATS4->lsa_read.ii_bytes,
|
||||
arg_LAYOUTSTATS4->lsa_write.ii_count,
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs4_op_read.c.orig 2015-09-10 11:35:03.095344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs4_op_read.c 2015-09-10 12:33:31.070344661 -0400
|
||||
@@ -418,7 +418,7 @@
|
||||
if (op_ctx->export->MaxOffsetRead < UINT64_MAX) {
|
||||
LogFullDebug(COMPONENT_NFS_V4,
|
||||
"Read offset=%" PRIu64
|
||||
- " count=%zd MaxOffSet=%" PRIu64,
|
||||
+ " size=%" PRIu64 " MaxOffSet=%" PRIu64,
|
||||
offset, size,
|
||||
op_ctx->export->MaxOffsetRead);
|
||||
|
||||
@@ -710,7 +710,7 @@
|
||||
}
|
||||
done:
|
||||
LogDebug(COMPONENT_NFS_V4,
|
||||
- "Status %s hints 0x%X offset %ld count %ld ",
|
||||
+ "Status %s hints 0x%X offset %" PRIu64 " count %" PRIu64,
|
||||
nfsstat4_to_str(res_IO_ADVISE->iaa_status),
|
||||
hints.hints, hints.offset, hints.count);
|
||||
|
||||
@@ -792,7 +792,7 @@
|
||||
}
|
||||
done:
|
||||
LogDebug(COMPONENT_NFS_V4,
|
||||
- "Status %s type %d offset %ld ",
|
||||
+ "Status %s type %d offset %" PRIu64,
|
||||
nfsstat4_to_str(res_SEEK->sr_status), arg_SEEK->sa_what,
|
||||
arg_SEEK->sa_offset);
|
||||
|
||||
--- nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs_proto_tools.c.orig 2015-09-10 12:34:47.664344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/Protocols/NFS/nfs_proto_tools.c 2015-09-10 12:35:56.368344661 -0400
|
||||
@@ -3715,7 +3715,7 @@
|
||||
nfs3_FSALattr_To_PartialFattr(FSAL_attr, &got, Fattr);
|
||||
if (want & ~got) {
|
||||
LogCrit(COMPONENT_NFSPROTO,
|
||||
- "Likely bug: FSAL did not fill in a standard NFSv3 attribute: missing %lx",
|
||||
+ "Likely bug: FSAL did not fill in a standard NFSv3 attribute: missing %" PRIx64,
|
||||
want & ~got);
|
||||
}
|
||||
|
||||
@@ -4206,6 +4206,6 @@
|
||||
if (!(attr->mode & S_ISVTX))
|
||||
return false;
|
||||
|
||||
- LogDebug(COMPONENT_NFS_V4, "sticky bit is set on %ld", attr->fileid);
|
||||
+ LogDebug(COMPONENT_NFS_V4, "sticky bit is set on %" PRIi64, attr->fileid);
|
||||
return true;
|
||||
}
|
||||
--- nfs-ganesha-2.3-rc1/src/SAL/nfs4_recovery.c.orig 2015-09-10 10:14:22.739344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/SAL/nfs4_recovery.c 2015-09-10 10:29:20.513344661 -0400
|
||||
@@ -66,8 +66,6 @@
|
||||
*/
|
||||
void nfs4_start_grace(nfs_grace_start_t *gsp)
|
||||
{
|
||||
- time_t current_time;
|
||||
-
|
||||
if (nfs_param.nfsv4_param.graceless) {
|
||||
LogEvent(COMPONENT_STATE,
|
||||
"NFS Server skipping GRACE (Graceless is true)");
|
||||
@@ -81,8 +79,7 @@
|
||||
* seconds Lease_Lifetime should be set to a smaller value for those
|
||||
* setups.
|
||||
*/
|
||||
- current_time = time(NULL);
|
||||
- atomic_store_uint64_t(¤t_grace, current_time);
|
||||
+ atomic_store_time_t(¤t_grace, time(NULL));
|
||||
|
||||
LogEvent(COMPONENT_STATE, "NFS Server Now IN GRACE, duration %d",
|
||||
(int)nfs_param.nfsv4_param.lease_lifetime);
|
||||
@@ -220,7 +217,7 @@
|
||||
PATH_MAX) > 0) {
|
||||
/* convert_opaque_value_max_for_dir does not prefix
|
||||
* the "(<length>:". So we need to do it here */
|
||||
- sprintf(cidstr_len, "%ld", strlen(cidstr));
|
||||
+ snprintf(cidstr_len, sizeof cidstr_len, "%zd", strlen(cidstr));
|
||||
total_len = strlen(cidstr) + strlen(str_client_addr) + 5 +
|
||||
strlen(cidstr_len);
|
||||
/* hold both long form clientid and IP */
|
||||
@@ -268,7 +265,7 @@
|
||||
PATH_MAX) > 0) {
|
||||
/* convert_opaque_value_max_for_dir does not prefix
|
||||
* the "(<length>:". So we need to do it here */
|
||||
- sprintf(cidstr_len, "%ld", strlen(cidstr));
|
||||
+ snprintf(cidstr_len, sizeof cidstr_len, "%zd", strlen(cidstr));
|
||||
total_len = strlen(cidstr) + strlen(buf) + 5 +
|
||||
strlen(cidstr_len);
|
||||
/* hold both long form clientid and IP */
|
||||
@@ -371,7 +368,7 @@
|
||||
dentp->d_name[0] != '\x1') {
|
||||
continue;
|
||||
}
|
||||
- sprintf(del_path, "%s/%s", path, dentp->d_name);
|
||||
+ snprintf(del_path, sizeof del_path, "%s/%s", path, dentp->d_name);
|
||||
if (unlink(del_path) < 0) {
|
||||
LogEvent(COMPONENT_CLIENTID,
|
||||
"unlink of %s failed errno: %d",
|
||||
@@ -576,7 +573,7 @@
|
||||
char lopath[PATH_MAX];
|
||||
int fd;
|
||||
|
||||
- sprintf(lopath, "%s/", tgtdir);
|
||||
+ snprintf(lopath, sizeof lopath, "%s/", tgtdir);
|
||||
strncat(lopath, dentp->d_name, strlen(dentp->d_name));
|
||||
fd = creat(lopath, 0700);
|
||||
if (fd < 0) {
|
||||
@@ -613,7 +610,7 @@
|
||||
if (del) {
|
||||
char del_path[PATH_MAX];
|
||||
|
||||
- sprintf(del_path, "%s/%s", path, dentp->d_name);
|
||||
+ snprintf(del_path, sizeof del_path, "%s/%s", path, dentp->d_name);
|
||||
if (unlink(del_path) < 0) {
|
||||
LogEvent(COMPONENT_CLIENTID,
|
||||
"unlink of %s failed errno: %d",
|
||||
@@ -1018,7 +1015,7 @@
|
||||
if (dentp->d_name[0] == '\x1') {
|
||||
char del_path[PATH_MAX];
|
||||
|
||||
- sprintf(del_path, "%s/%s", parent_path, dentp->d_name);
|
||||
+ snprintf(del_path, sizeof del_path, "%s/%s", parent_path, dentp->d_name);
|
||||
if (unlink(del_path) < 0) {
|
||||
LogEvent(COMPONENT_CLIENTID,
|
||||
"unlink of %s failed errno: %d",
|
||||
--- nfs-ganesha-2.3-rc2/src/SAL/nfs4_state_id.c.orig 2015-09-11 18:57:12.988344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc2/src/SAL/nfs4_state_id.c 2015-09-11 18:59:07.729344661 -0400
|
||||
@@ -370,8 +370,7 @@
|
||||
res = ((uint32_t) pkey->state_owner->so_owner.so_nfs4_owner.so_clientid
|
||||
+ (uint32_t) sum + pkey->state_owner->so_owner_len
|
||||
+ (uint32_t) pkey->state_owner->so_type
|
||||
- + (uint32_t) (uint64_t) pkey->state_entry)
|
||||
- % (uint32_t) hparam->index_size;
|
||||
+ + (uintptr_t) pkey->state_entry) % (uint32_t) hparam->index_size;
|
||||
|
||||
if (isDebug(COMPONENT_HASHTABLE))
|
||||
LogFullDebug(COMPONENT_STATE, "value = %" PRIu32, res);
|
||||
@@ -406,7 +405,7 @@
|
||||
res = (uint64_t) pkey->state_owner->so_owner.so_nfs4_owner.so_clientid
|
||||
+ (uint64_t) sum + pkey->state_owner->so_owner_len
|
||||
+ (uint64_t) pkey->state_owner->so_type
|
||||
- + (uint64_t) pkey->state_entry;
|
||||
+ + (uintptr_t) pkey->state_entry;
|
||||
|
||||
if (isDebug(COMPONENT_HASHTABLE))
|
||||
LogFullDebug(COMPONENT_STATE, "rbt = %" PRIu64, res);
|
||||
--- nfs-ganesha-2.3-rc1/src/support/exports.c.orig 2015-09-10 11:19:42.941344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc1/src/support/exports.c 2015-09-10 11:20:44.579344661 -0400
|
||||
@@ -818,7 +818,7 @@
|
||||
export->fullpath, export->FS_tag, perms);
|
||||
|
||||
LogInfo(COMPONENT_CONFIG,
|
||||
- "Export %d has %ld defined clients", export->export_id,
|
||||
+ "Export %d has %zd defined clients", export->export_id,
|
||||
glist_length(&export->clients));
|
||||
put_gsh_export(export);
|
||||
return 0;
|
@ -1,62 +0,0 @@
|
||||
--- nfs-ganesha-2.3-rc2/src/CMakeLists.txt.orig 2015-09-11 19:01:01.530344661 -0400
|
||||
+++ nfs-ganesha-2.3-rc2/src/CMakeLists.txt 2015-09-11 19:05:13.269344661 -0400
|
||||
@@ -765,9 +765,12 @@
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/portability_cmake_2.8 /usr/share/cmake/Modules ${CMAKE_MODULE_PATH})
|
||||
endif( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8" )
|
||||
|
||||
+find_library(LIBNTIRPC ntirpc)
|
||||
+
|
||||
+set(CMAKE_C_FLAGS "-isystem /usr/include/ntirpc ${CMAKE_C_FLAGS}")
|
||||
+
|
||||
include_directories(
|
||||
"${PROJECT_BINARY_DIR}/include"
|
||||
- "${PROJECT_SOURCE_DIR}/libntirpc/ntirpc/"
|
||||
"${PROJECT_SOURCE_DIR}/include"
|
||||
"${OS_INCLUDE_DIR}"
|
||||
"${KRB5_INCLUDE_DIRS}"
|
||||
@@ -783,12 +786,6 @@
|
||||
|
||||
|
||||
#callers add:
|
||||
-# target_link_libraries(your_library ${LIBTIRPC_LIBRARIES})
|
||||
-set(LIBTIRPC_INCLUDE_DIR
|
||||
- "${PROJECT_BINARY_DIR}/libtirpc/ntirpc"
|
||||
- "${PROJECT_BINARY_DIR}/libtirpc/ntirpc/rpc"
|
||||
-)
|
||||
-set(LIBTIRPC_LIBRARIES ntirpc)
|
||||
|
||||
# Find misc system libs
|
||||
find_library(LIBRT rt) # extended Pthreads functions
|
||||
@@ -916,6 +913,7 @@
|
||||
${KRB5_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${LIBRT}
|
||||
+ ${LIBNTIRPC}
|
||||
)
|
||||
|
||||
# Config file; make sure it doesn't clobber an existing one
|
||||
@@ -926,16 +924,6 @@
|
||||
# pre-create PREFIX/var/run/ganesha
|
||||
install(DIRECTORY DESTINATION ${SYSSTATEDIR}/run/ganesha)
|
||||
|
||||
-IF( NOT EXISTS ${PROJECT_SOURCE_DIR}/libntirpc/ganesha/CMakeLists.txt )
|
||||
-message( FATAL_ERROR
|
||||
-"No CMakeLists.txt found in libntirpc
|
||||
-This probably means that the directory was not properly populated.
|
||||
-Please run the following command to do that and use cmake again:
|
||||
- git submodule update --init
|
||||
-Alternatively, if you are not using git, get the current version at
|
||||
- https://github.com/nfs-ganesha/ntirpc" )
|
||||
-ENDIF( NOT EXISTS ${PROJECT_SOURCE_DIR}/libntirpc/ganesha/CMakeLists.txt )
|
||||
-
|
||||
add_subdirectory(log)
|
||||
add_subdirectory(config_parsing)
|
||||
add_subdirectory(cidr)
|
||||
@@ -945,7 +933,6 @@
|
||||
add_subdirectory(NodeList)
|
||||
add_subdirectory(cache_inode)
|
||||
add_subdirectory(SAL)
|
||||
-add_subdirectory(libntirpc/ganesha)
|
||||
add_subdirectory(RPCAL)
|
||||
add_subdirectory(Protocols)
|
||||
add_subdirectory(support)
|
@ -1,10 +0,0 @@
|
||||
--- nfs-ganesha-2.3-rc3/src/scripts/ganeshactl/CMakeLists.txt.orig 2015-09-18 08:12:14.081542533 -0400
|
||||
+++ nfs-ganesha-2.3-rc3/src/scripts/ganeshactl/CMakeLists.txt 2015-09-18 08:47:26.199542533 -0400
|
||||
@@ -124,6 +124,6 @@
|
||||
|
||||
install(
|
||||
CODE
|
||||
- "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PYTHON} ${SETUP_PY} install --skip-build --prefix=$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX})"
|
||||
+ "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PYTHON} ${SETUP_PY} install --skip-build --prefix=${DESTDIR}${CMAKE_INSTALL_PREFIX})"
|
||||
)
|
||||
endif(PYTHON)
|
@ -1,62 +0,0 @@
|
||||
--- nfs-ganesha-2.3-rc4/src/CMakeLists.txt.orig 2015-09-28 09:41:36.169664072 -0400
|
||||
+++ nfs-ganesha-2.3-rc4/src/CMakeLists.txt 2015-09-28 09:44:34.120664072 -0400
|
||||
@@ -780,9 +780,12 @@
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/portability_cmake_2.8 /usr/share/cmake/Modules ${CMAKE_MODULE_PATH})
|
||||
endif( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8" )
|
||||
|
||||
+find_library(LIBNTIRPC ntirpc)
|
||||
+
|
||||
+set(CMAKE_C_FLAGS "-isystem /usr/include/ntirpc ${CMAKE_C_FLAGS}")
|
||||
+
|
||||
include_directories(
|
||||
"${PROJECT_BINARY_DIR}/include"
|
||||
- "${PROJECT_SOURCE_DIR}/libntirpc/ntirpc/"
|
||||
"${PROJECT_SOURCE_DIR}/include"
|
||||
"${OS_INCLUDE_DIR}"
|
||||
"${KRB5_INCLUDE_DIRS}"
|
||||
@@ -798,12 +801,6 @@
|
||||
|
||||
|
||||
#callers add:
|
||||
-# target_link_libraries(your_library ${LIBTIRPC_LIBRARIES})
|
||||
-set(LIBTIRPC_INCLUDE_DIR
|
||||
- "${PROJECT_BINARY_DIR}/libtirpc/ntirpc"
|
||||
- "${PROJECT_BINARY_DIR}/libtirpc/ntirpc/rpc"
|
||||
-)
|
||||
-set(LIBTIRPC_LIBRARIES ntirpc)
|
||||
|
||||
# Find misc system libs
|
||||
find_library(LIBRT rt) # extended Pthreads functions
|
||||
@@ -931,6 +928,7 @@
|
||||
${KRB5_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${LIBRT}
|
||||
+ ${LIBNTIRPC}
|
||||
)
|
||||
|
||||
# Config file; make sure it doesn't clobber an existing one
|
||||
@@ -941,16 +939,6 @@
|
||||
# pre-create PREFIX/var/run/ganesha
|
||||
install(DIRECTORY DESTINATION ${SYSSTATEDIR}/run/ganesha)
|
||||
|
||||
-IF( NOT EXISTS ${PROJECT_SOURCE_DIR}/libntirpc/ganesha/CMakeLists.txt )
|
||||
-message( FATAL_ERROR
|
||||
-"No CMakeLists.txt found in libntirpc
|
||||
-This probably means that the directory was not properly populated.
|
||||
-Please run the following command to do that and use cmake again:
|
||||
- git submodule update --init
|
||||
-Alternatively, if you are not using git, get the current version at
|
||||
- https://github.com/nfs-ganesha/ntirpc" )
|
||||
-ENDIF( NOT EXISTS ${PROJECT_SOURCE_DIR}/libntirpc/ganesha/CMakeLists.txt )
|
||||
-
|
||||
add_subdirectory(log)
|
||||
add_subdirectory(config_parsing)
|
||||
add_subdirectory(cidr)
|
||||
@@ -960,7 +948,6 @@
|
||||
add_subdirectory(NodeList)
|
||||
add_subdirectory(cache_inode)
|
||||
add_subdirectory(SAL)
|
||||
-add_subdirectory(libntirpc/ganesha)
|
||||
add_subdirectory(RPCAL)
|
||||
add_subdirectory(Protocols)
|
||||
add_subdirectory(support)
|
@ -1,20 +0,0 @@
|
||||
--- nfs-ganesha-2.3-rc5/src/CMakeLists.txt.orig 2015-10-05 07:32:38.294664072 -0400
|
||||
+++ nfs-ganesha-2.3-rc5/src/CMakeLists.txt 2015-10-08 14:20:40.238664072 -0400
|
||||
@@ -20,7 +20,7 @@
|
||||
set(GANESHA_MINOR_VERSION 3)
|
||||
|
||||
# needs to come after project()
|
||||
-IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
+IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR CMAKE_INSTALL_PREFIX STREQUAL "/usr")
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install prefix for common files" FORCE)
|
||||
message(STATUS "override default CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}")
|
||||
SET(SYSCONFDIR "/etc" CACHE PATH "Install prefix for common files" FORCE)
|
||||
@@ -29,7 +29,7 @@
|
||||
message(STATUS "was set CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}")
|
||||
SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc" CACHE PATH "Install prefix for common files" FORCE)
|
||||
SET(SYSSTATEDIR "${CMAKE_INSTALL_PREFIX}/var" CACHE PATH "Install prefix for common files" FORCE)
|
||||
-ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
+ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR CMAKE_INSTALL_PREFIX STREQUAL "/usr")
|
||||
# Patch level is always ".0" for mainline (master). It is blank for development.
|
||||
# When starting a stable maintenance branch, this becomes ".N"
|
||||
# where N is monotonically increasing starting at 1. Remember to include the "." !!
|
@ -1,11 +0,0 @@
|
||||
--- nfs-ganesha-2.3-rc5/src/include/config-h.in.cmake.orig 2015-10-08 15:04:29.232664072 -0400
|
||||
+++ nfs-ganesha-2.3-rc5/src/include/config-h.in.cmake 2015-10-08 15:04:45.637664072 -0400
|
||||
@@ -14,7 +14,7 @@
|
||||
#define _GIT_HEAD_COMMIT "@_GIT_HEAD_COMMIT@"
|
||||
#define _GIT_DESCRIBE "@_GIT_DESCRIBE@"
|
||||
#define BUILD_HOST "@BUILD_HOST_NAME@"
|
||||
-#define FSAL_MODULE_LOC "@MODULES_PATH@/@FSAL_DESTINATION@"
|
||||
+#define FSAL_MODULE_LOC "@FSAL_DESTINATION@"
|
||||
/* Build controls */
|
||||
|
||||
#cmakedefine _MSPAC_SUPPORT 1
|
@ -1,10 +0,0 @@
|
||||
--- nfs-ganesha-2.3-rc5/src/scripts/ganeshactl/CMakeLists.txt.orig 2015-10-06 14:15:53.881664072 -0400
|
||||
+++ nfs-ganesha-2.3-rc5/src/scripts/ganeshactl/CMakeLists.txt 2015-10-06 14:16:16.232664072 -0400
|
||||
@@ -124,6 +124,6 @@
|
||||
|
||||
install(
|
||||
CODE
|
||||
- "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PYTHON} ${SETUP_PY} install --skip-build --prefix=$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX})"
|
||||
+ "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PYTHON} ${SETUP_PY} install --skip-build --prefix=\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX})"
|
||||
)
|
||||
endif(PYTHON)
|
105
nfs-ganesha.init
105
nfs-ganesha.init
@ -1,105 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# glusterd Startup script for the Ganesha NFS server
|
||||
#
|
||||
# chkconfig: - 20 80
|
||||
# description: NFSv4 file-system server
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: nfs-ganesha
|
||||
# Required-Start: $local_fs $network
|
||||
# Required-Stop: $local_fs $network
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start:
|
||||
# Default-Stop: 0 1 2 3 4 5 6
|
||||
# Short-Description: Ganesha NFS server
|
||||
# Description: NFSv4 file-system server
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
exe="/usr/sbin/nfs-ganesha.sh"
|
||||
prog="nfs-ganesha"
|
||||
|
||||
# Fedora File System Layout dictates /run
|
||||
[ -e /run ] && RUNDIR="/run"
|
||||
pidf="${RUNDIR:-/var/run}/$prog.pid"
|
||||
|
||||
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
|
||||
|
||||
lockfile=/var/lock/subsys/$prog
|
||||
|
||||
start() {
|
||||
[ -x $exe ] || exit 5
|
||||
echo -n $"Starting $prog: "
|
||||
daemon $exe
|
||||
retval=$?
|
||||
echo
|
||||
[ $retval -eq 0 ] && touch $lockfile
|
||||
return $retval
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $prog: "
|
||||
killproc $prog
|
||||
retval=$?
|
||||
echo
|
||||
[ $retval -eq 0 ] && rm -f $lockfile
|
||||
return $retval
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
reload() {
|
||||
restart
|
||||
}
|
||||
|
||||
force_reload() {
|
||||
restart
|
||||
}
|
||||
|
||||
rh_status() {
|
||||
status $prog
|
||||
}
|
||||
|
||||
rh_status_q() {
|
||||
rh_status &>/dev/null
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
rh_status_q && exit 0
|
||||
$1
|
||||
;;
|
||||
stop)
|
||||
rh_status_q || exit 0
|
||||
$1
|
||||
;;
|
||||
restart)
|
||||
$1
|
||||
;;
|
||||
reload)
|
||||
rh_status_q || exit 7
|
||||
$1
|
||||
;;
|
||||
force-reload)
|
||||
force_reload
|
||||
;;
|
||||
status)
|
||||
rh_status
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
rh_status_q || exit 0
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
|
||||
exit 2
|
||||
esac
|
||||
exit $?
|
@ -1,12 +0,0 @@
|
||||
[Unit]
|
||||
Description=User-mode file server for NFS
|
||||
Documentation=https://github.com/nfs-ganesha/nfs-ganesha/wiki
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/ganesha.nfsd
|
||||
Type=forking
|
||||
PIDFile=/var/run/ganesha.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
773
nfs-ganesha.spec
773
nfs-ganesha.spec
@ -1,773 +0,0 @@
|
||||
|
||||
%global _hardened_build 1
|
||||
|
||||
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
|
||||
%global with_nfsidmap 1
|
||||
%else
|
||||
%global with_nfsidmap 0
|
||||
%endif
|
||||
|
||||
%if ( 0%{?fedora} >= 18 || 0%{?rhel} >= 7 )
|
||||
%global with_systemd 1
|
||||
%else
|
||||
%global with_systemd 0
|
||||
%endif
|
||||
|
||||
# Conditionally enable some FSALs, disable others.
|
||||
#
|
||||
# 1. rpmbuild accepts these options (gpfs as example):
|
||||
# --with gpfs
|
||||
# --without gpfs
|
||||
|
||||
%define on_off_switch() %%{?with_%1:ON}%%{!?with_%1:OFF}
|
||||
|
||||
# A few explanation about %%bcond_with and %%bcond_without
|
||||
# /!\ be careful: this syntax can be quite messy
|
||||
# %%bcond_with means you add a "--with" option, default = without this feature
|
||||
# %%bcond_without adds a"--without" so the feature is enabled by default
|
||||
|
||||
%bcond_without nullfs
|
||||
%global use_fsal_null %{on_off_switch nullfs}
|
||||
|
||||
%bcond_with gpfs
|
||||
%global use_fsal_gpfs %{on_off_switch gpfs}
|
||||
|
||||
%bcond_without xfs
|
||||
%global use_fsal_xfs %{on_off_switch xfs}
|
||||
|
||||
%bcond_without ceph
|
||||
%global use_fsal_ceph %{on_off_switch ceph}
|
||||
|
||||
%bcond_with lustre
|
||||
%global use_fsal_lustre %{on_off_switch lustre}
|
||||
|
||||
%bcond_with shook
|
||||
%global use_fsal_shook %{on_off_switch shook}
|
||||
|
||||
%bcond_without gluster
|
||||
%global use_fsal_gluster %{on_off_switch gluster}
|
||||
|
||||
%bcond_with hpss
|
||||
%global use_fsal_hpss %{on_off_switch hpss}
|
||||
|
||||
%bcond_with panfs
|
||||
%global use_fsal_panfs %{on_off_switch panfs}
|
||||
|
||||
%bcond_with pt
|
||||
%global use_fsal_pt %{on_off_switch pt}
|
||||
|
||||
%bcond_with rdma
|
||||
%global use_rdma %{on_off_switch rdma}
|
||||
|
||||
%bcond_without jemalloc
|
||||
|
||||
%bcond_with lustre_up
|
||||
%global use_lustre_up %{on_off_switch lustre_up}
|
||||
|
||||
%bcond_with lttng
|
||||
%global use_lttng %{on_off_switch lttng}
|
||||
|
||||
%bcond_without utils
|
||||
%global use_utils %{on_off_switch utils}
|
||||
|
||||
%bcond_without gui_utils
|
||||
%global use_gui_utils %{on_off_switch gui_utils}
|
||||
|
||||
%bcond_without system_ntirpc
|
||||
%global use_system_ntirpc %{on_off_switch system_ntirpc}
|
||||
|
||||
%global dev_version %{lua: extraver = string.gsub('', '%-', '.'); print(extraver) }
|
||||
|
||||
Name: nfs-ganesha
|
||||
Version: 2.3.0
|
||||
Release: 1%{?dev_version:%{dev_version}}%{?dist}
|
||||
Summary: NFS-Ganesha is a NFS Server running in user space
|
||||
Group: Applications/System
|
||||
License: LGPLv3+
|
||||
Url: https://github.com/nfs-ganesha/nfs-ganesha/wiki
|
||||
|
||||
Source0: https://github.com/%{name}/%{name}/archive/V%{version}/%{name}-%{version}%{dev_version}.tar.gz
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: krb5-devel
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: libcap-devel
|
||||
BuildRequires: libblkid-devel
|
||||
BuildRequires: libuuid-devel
|
||||
%if %{with system_ntirpc}
|
||||
BuildRequires: libntirpc-devel >= 1.3.1
|
||||
%endif
|
||||
Requires: dbus
|
||||
Requires: nfs-utils
|
||||
%if %{with_nfsidmap}
|
||||
BuildRequires: libnfsidmap-devel
|
||||
%else
|
||||
BuildRequires: nfs-utils-lib-devel
|
||||
%endif
|
||||
%if %{with rdma}
|
||||
BuildRequires: libmooshika-devel >= 0.6-0
|
||||
%endif
|
||||
%if %{with jemalloc}
|
||||
BuildRequires: jemalloc-devel
|
||||
%endif
|
||||
%if %{with lustre_up}
|
||||
BuildRequires: lcap-devel >= 0.1-0
|
||||
%endif
|
||||
%if %{with_systemd}
|
||||
BuildRequires: systemd
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
%else
|
||||
BuildRequires: initscripts
|
||||
%endif
|
||||
|
||||
# Use CMake variables
|
||||
|
||||
%description
|
||||
nfs-ganesha : NFS-GANESHA is a NFS Server running in user space.
|
||||
It comes with various back-end modules (called FSALs) provided as
|
||||
shared objects to support different file systems and name-spaces.
|
||||
|
||||
%package mount-9P
|
||||
Summary: a 9p mount helper
|
||||
Group: Applications/System
|
||||
|
||||
%description mount-9P
|
||||
This package contains the mount.9P script that clients can use
|
||||
to simplify mounting to NFS-GANESHA. This is a 9p mount helper.
|
||||
|
||||
%package vfs
|
||||
Summary: The NFS-GANESHA's VFS FSAL
|
||||
Group: Applications/System
|
||||
BuildRequires: libattr-devel
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
|
||||
%description vfs
|
||||
This package contains a FSAL shared object to
|
||||
be used with NFS-Ganesha to support VFS based filesystems
|
||||
|
||||
%package proxy
|
||||
Summary: The NFS-GANESHA's PROXY FSAL
|
||||
Group: Applications/System
|
||||
BuildRequires: libattr-devel
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
|
||||
%description proxy
|
||||
This package contains a FSAL shared object to
|
||||
be used with NFS-Ganesha to support PROXY based filesystems
|
||||
|
||||
%if %{with utils}
|
||||
%package utils
|
||||
Summary: The NFS-GANESHA's util scripts
|
||||
Group: Applications/System
|
||||
Requires: dbus-python, pygobject2
|
||||
%if %{with gui_utils}
|
||||
BuildRequires: PyQt4-devel
|
||||
Requires: PyQt4
|
||||
%endif
|
||||
Requires: nfs-ganesha = %{version}-%{release}, python
|
||||
|
||||
%description utils
|
||||
This package contains utility scripts for managing the NFS-GANESHA server
|
||||
%endif
|
||||
|
||||
%if %{with lttng}
|
||||
%package lttng
|
||||
Summary: The NFS-GANESHA's library for use with LTTng
|
||||
Group: Applications/System
|
||||
BuildRequires: lttng-ust-devel >= 2.3
|
||||
Requires: nfs-ganesha = %{version}-%{release}, lttng-tools >= 2.3, lttng-ust >= 2.3
|
||||
|
||||
%description lttng
|
||||
This package contains the libganesha_trace.so library. When preloaded
|
||||
to the ganesha.nfsd server, it makes it possible to trace using LTTng.
|
||||
%endif
|
||||
|
||||
# Option packages start here. use "rpmbuild --with lustre" (or equivalent)
|
||||
# for activating this part of the spec file
|
||||
|
||||
# NULL
|
||||
%if %{with nullfs}
|
||||
%package nullfs
|
||||
Summary: The NFS-GANESHA's NULLFS Stackable FSAL
|
||||
Group: Applications/System
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
|
||||
%description nullfs
|
||||
This package contains a Stackable FSAL shared object to
|
||||
be used with NFS-Ganesha. This is mostly a template for future (more sophisticated) stackable FSALs
|
||||
%endif
|
||||
|
||||
# GPFS
|
||||
%if %{with gpfs}
|
||||
%package gpfs
|
||||
Summary: The NFS-GANESHA's GPFS FSAL
|
||||
Group: Applications/System
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
|
||||
%description gpfs
|
||||
This package contains a FSAL shared object to
|
||||
be used with NFS-Ganesha to support GPFS backend
|
||||
%endif
|
||||
|
||||
# CEPH
|
||||
%if %{with ceph}
|
||||
%package ceph
|
||||
Summary: The NFS-GANESHA's CEPH FSAL
|
||||
Group: Applications/System
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
Requires: ceph >= 0.78
|
||||
BuildRequires: ceph-devel >= 0.78
|
||||
|
||||
%description ceph
|
||||
This package contains a FSAL shared object to
|
||||
be used with NFS-Ganesha to support CEPH
|
||||
%endif
|
||||
|
||||
# LUSTRE
|
||||
%if %{with lustre}
|
||||
%package lustre
|
||||
Summary: The NFS-GANESHA's LUSTRE FSAL
|
||||
Group: Applications/System
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
Requires: lustre
|
||||
BuildRequires: libattr-devel lustre
|
||||
|
||||
%description lustre
|
||||
This package contains a FSAL shared object to
|
||||
be used with NFS-Ganesha to support LUSTRE
|
||||
%endif
|
||||
|
||||
# SHOOK
|
||||
%if %{with shook}
|
||||
%package shook
|
||||
Summary: The NFS-GANESHA's LUSTRE/SHOOK FSAL
|
||||
Group: Applications/System
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
Requires: lustre shook-client
|
||||
BuildRequires: libattr-devel lustre shook-devel
|
||||
|
||||
%description shook
|
||||
This package contains a FSAL shared object to
|
||||
be used with NFS-Ganesha to support LUSTRE via SHOOK
|
||||
%endif
|
||||
|
||||
# XFS
|
||||
%if %{with xfs}
|
||||
%package xfs
|
||||
Summary: The NFS-GANESHA's XFS FSAL
|
||||
Group: Applications/System
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
BuildRequires: libattr-devel xfsprogs-devel
|
||||
|
||||
%description xfs
|
||||
This package contains a shared object to be used with FSAL_VFS
|
||||
to support XFS correctly
|
||||
%endif
|
||||
|
||||
# HPSS
|
||||
%if %{with hpss}
|
||||
%package hpss
|
||||
Summary: The NFS-GANESHA's HPSS FSAL
|
||||
Group: Applications/System
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
#BuildRequires: hpssfs
|
||||
|
||||
%description hpss
|
||||
This package contains a FSAL shared object to
|
||||
be used with NFS-Ganesha to support HPSS
|
||||
%endif
|
||||
|
||||
# PANFS
|
||||
%if %{with panfs}
|
||||
%package panfs
|
||||
Summary: The NFS-GANESHA's PANFS FSAL
|
||||
Group: Applications/System
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
|
||||
%description panfs
|
||||
This package contains a FSAL shared object to
|
||||
be used with NFS-Ganesha to support PANFS
|
||||
%endif
|
||||
|
||||
# PT
|
||||
%if %{with pt}
|
||||
%package pt
|
||||
Summary: The NFS-GANESHA's PT FSAL
|
||||
Group: Applications/System
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
|
||||
|
||||
%description pt
|
||||
This package contains a FSAL shared object to
|
||||
be used with NFS-Ganesha to support PT
|
||||
%endif
|
||||
|
||||
# GLUSTER
|
||||
%if %{with gluster}
|
||||
%package gluster
|
||||
Summary: The NFS-GANESHA's GLUSTER FSAL
|
||||
Group: Applications/System
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
BuildRequires: glusterfs-api-devel >= 3.7.4
|
||||
BuildRequires: libattr-devel, libacl-devel
|
||||
|
||||
%description gluster
|
||||
This package contains a FSAL shared object to
|
||||
be used with NFS-Ganesha to support Gluster
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}%{dev_version}
|
||||
rm -rf contrib/libzfswrapper
|
||||
|
||||
%build
|
||||
cd src && %cmake . -DCMAKE_BUILD_TYPE=Debug \
|
||||
-DBUILD_CONFIG=rpmbuild \
|
||||
-DUSE_FSAL_NULL=%{use_fsal_null} \
|
||||
-DUSE_FSAL_ZFS=NO \
|
||||
-DUSE_FSAL_XFS=%{use_fsal_xfs} \
|
||||
-DUSE_FSAL_CEPH=%{use_fsal_ceph} \
|
||||
-DUSE_FSAL_LUSTRE=%{use_fsal_lustre} \
|
||||
-DUSE_FSAL_SHOOK=%{use_fsal_shook} \
|
||||
-DUSE_FSAL_GPFS=%{use_fsal_gpfs} \
|
||||
-DUSE_FSAL_HPSS=%{use_fsal_hpss} \
|
||||
-DUSE_FSAL_PANFS=%{use_fsal_panfs} \
|
||||
-DUSE_FSAL_PT=%{use_fsal_pt} \
|
||||
-DUSE_FSAL_GLUSTER=%{use_fsal_gluster} \
|
||||
-DUSE_SYSTEM_NTIRPC=%{use_system_ntirpc} \
|
||||
-DUSE_9P_RDMA=%{use_rdma} \
|
||||
-DUSE_FSAL_LUSTRE_UP=%{use_lustre_up} \
|
||||
-DUSE_LTTNG=%{use_lttng} \
|
||||
-DUSE_ADMIN_TOOLS=%{use_utils} \
|
||||
-DUSE_GUI_ADMIN_TOOLS=%{use_gui_utils} \
|
||||
-DUSE_FSAL_VFS=ON \
|
||||
-DUSE_FSAL_PROXY=ON \
|
||||
-DUSE_DBUS=ON \
|
||||
-DUSE_9P=ON \
|
||||
-DDISTNAME_HAS_GIT_DATA=OFF \
|
||||
%if %{with jemalloc}
|
||||
-DALLOCATOR=jemalloc
|
||||
%endif
|
||||
|
||||
make %{?_smp_mflags} || make %{?_smp_mflags} || make
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/ganesha/
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
mkdir -p %{buildroot}%{_libdir}/ganesha
|
||||
mkdir -p %{buildroot}%{_localstatedir}/run/ganesha
|
||||
cd src
|
||||
install -m 644 config_samples/logrotate_ganesha %{buildroot}%{_sysconfdir}/logrotate.d/ganesha
|
||||
install -m 644 scripts/ganeshactl/org.ganesha.nfsd.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d
|
||||
install -m 755 tools/mount.9P %{buildroot}%{_sbindir}/mount.9P
|
||||
|
||||
install -m 644 config_samples/vfs.conf %{buildroot}%{_sysconfdir}/ganesha
|
||||
|
||||
%if %{with_systemd}
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
install -m 644 scripts/systemd/nfs-ganesha.service %{buildroot}%{_unitdir}/nfs-ganesha.service
|
||||
install -m 644 scripts/systemd/nfs-ganesha-lock.service %{buildroot}%{_unitdir}/nfs-ganesha-lock.service
|
||||
install -m 644 scripts/systemd/sysconfig/nfs-ganesha %{buildroot}%{_sysconfdir}/sysconfig/ganesha
|
||||
%else
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||
install -m 755 scripts/init.d/nfs-ganesha %{buildroot}%{_sysconfdir}/init.d/nfs-ganesha
|
||||
install -m 644 scripts/init.d/sysconfig/ganesha %{buildroot}%{_sysconfdir}/sysconfig/ganesha
|
||||
%endif
|
||||
|
||||
%if %{with utils} && 0%{?rhel} && 0%{?rhel} <= 6
|
||||
%{!?__python2: %global __python2 /usr/bin/python2}
|
||||
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
%endif
|
||||
|
||||
%if %{with pt}
|
||||
install -m 644 config_samples/pt.conf %{buildroot}%{_sysconfdir}/ganesha
|
||||
%endif
|
||||
|
||||
%if %{with xfs}
|
||||
install -m 644 config_samples/xfs.conf %{buildroot}%{_sysconfdir}/ganesha
|
||||
%endif
|
||||
|
||||
%if %{with ceph}
|
||||
install -m 644 config_samples/ceph.conf %{buildroot}%{_sysconfdir}/ganesha
|
||||
%endif
|
||||
|
||||
%if %{with lustre}
|
||||
install -m 755 config_samples/lustre.conf %{buildroot}%{_sysconfdir}/ganesha
|
||||
%endif
|
||||
|
||||
%if %{with gpfs}
|
||||
install -m 644 config_samples/gpfs.conf %{buildroot}%{_sysconfdir}/ganesha
|
||||
install -m 644 config_samples/gpfs.ganesha.nfsd.conf %{buildroot}%{_sysconfdir}/ganesha
|
||||
install -m 644 config_samples/gpfs.ganesha.main.conf %{buildroot}%{_sysconfdir}/ganesha
|
||||
install -m 644 config_samples/gpfs.ganesha.log.conf %{buildroot}%{_sysconfdir}/ganesha
|
||||
install -m 644 config_samples/gpfs.ganesha.exports.conf %{buildroot}%{_sysconfdir}/ganesha
|
||||
%if ! %{with_systemd}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||
install -m 755 scripts/init.d/nfs-ganesha.gpfs %{buildroot}%{_sysconfdir}/init.d/nfs-ganesha-gpfs
|
||||
%endif
|
||||
%endif
|
||||
|
||||
make DESTDIR=%{buildroot} install
|
||||
|
||||
install -m 644 ChangeLog %{buildroot}%{_defaultdocdir}/ganesha
|
||||
|
||||
%post
|
||||
%if %{with_systemd}
|
||||
%systemd_post nfs-ganesha.service
|
||||
%systemd_post nfs-ganesha-lock.service
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%if %{with_systemd}
|
||||
%systemd_preun nfs-ganesha-lock.service
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if %{with_systemd}
|
||||
%systemd_postun_with_restart nfs-ganesha-lock.service
|
||||
%endif
|
||||
|
||||
%files
|
||||
%license src/LICENSE.txt
|
||||
%{_bindir}/ganesha.nfsd
|
||||
%if ! %{with system_ntirpc}
|
||||
%{_libdir}/libntirpc.so.1.3.0
|
||||
%{_libdir}/libntirpc.so.1.3
|
||||
%{_libdir}/libntirpc.so
|
||||
%{_libdir}/pkgconfig/libntirpc.pc
|
||||
%{_includedir}/ntirpc/
|
||||
%endif
|
||||
%config %{_sysconfdir}/dbus-1/system.d/org.ganesha.nfsd.conf
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/ganesha
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/ganesha
|
||||
%dir %{_sysconfdir}/ganesha/
|
||||
%config(noreplace) %{_sysconfdir}/ganesha/ganesha.conf
|
||||
%dir %{_defaultdocdir}/ganesha/
|
||||
%{_defaultdocdir}/ganesha/*
|
||||
%doc %{_defaultdocdir}/ganesha/ChangeLog
|
||||
%dir %{_localstatedir}/run/ganesha
|
||||
|
||||
%if %{with_systemd}
|
||||
%{_unitdir}/nfs-ganesha.service
|
||||
%{_unitdir}/nfs-ganesha-lock.service
|
||||
%else
|
||||
%{_sysconfdir}/init.d/nfs-ganesha
|
||||
%endif
|
||||
|
||||
%files mount-9P
|
||||
%{_sbindir}/mount.9P
|
||||
|
||||
|
||||
%files vfs
|
||||
%{_libdir}/ganesha/libfsalvfs*
|
||||
%config(noreplace) %{_sysconfdir}/ganesha/vfs.conf
|
||||
|
||||
|
||||
%files proxy
|
||||
%{_libdir}/ganesha/libfsalproxy*
|
||||
|
||||
# Optional packages
|
||||
%if %{with nullfs}
|
||||
%files nullfs
|
||||
%{_libdir}/ganesha/libfsalnull*
|
||||
%endif
|
||||
|
||||
%if %{with gpfs}
|
||||
%files gpfs
|
||||
%{_libdir}/ganesha/libfsalgpfs*
|
||||
%config(noreplace) %{_sysconfdir}/ganesha/gpfs.conf
|
||||
%config(noreplace) %{_sysconfdir}/ganesha/gpfs.ganesha.nfsd.conf
|
||||
%config(noreplace) %{_sysconfdir}/ganesha/gpfs.ganesha.main.conf
|
||||
%config(noreplace) %{_sysconfdir}/ganesha/gpfs.ganesha.log.conf
|
||||
%config(noreplace) %{_sysconfdir}/ganesha/gpfs.ganesha.exports.conf
|
||||
%if ! %{with_systemd}
|
||||
%{_sysconfdir}/init.d/nfs-ganesha-gpfs
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{with xfs}
|
||||
%files xfs
|
||||
%{_libdir}/ganesha/libfsalxfs*
|
||||
%config(noreplace) %{_sysconfdir}/ganesha/xfs.conf
|
||||
%endif
|
||||
|
||||
%if %{with ceph}
|
||||
%files ceph
|
||||
%{_libdir}/ganesha/libfsalceph*
|
||||
%config(noreplace) %{_sysconfdir}/ganesha/ceph.conf
|
||||
%endif
|
||||
|
||||
%if %{with lustre}
|
||||
%files lustre
|
||||
%config(noreplace) %{_sysconfdir}/ganesha/lustre.conf
|
||||
%{_libdir}/ganesha/libfsallustre*
|
||||
%endif
|
||||
|
||||
%if %{with shook}
|
||||
%files shook
|
||||
%{_libdir}/ganesha/libfsalshook*
|
||||
%endif
|
||||
|
||||
%if %{with gluster}
|
||||
%files gluster
|
||||
%{_libdir}/ganesha/libfsalgluster*
|
||||
%endif
|
||||
|
||||
%if %{with hpss}
|
||||
%files hpss
|
||||
%{_libdir}/ganesha/libfsalhpss*
|
||||
%endif
|
||||
|
||||
%if %{with panfs}
|
||||
%files panfs
|
||||
%{_libdir}/ganesha/libfsalpanfs*
|
||||
%endif
|
||||
|
||||
%if %{with pt}
|
||||
%files pt
|
||||
%{_libdir}/ganesha/libfsalpt*
|
||||
%config(noreplace) %{_sysconfdir}/ganesha/pt.conf
|
||||
%endif
|
||||
|
||||
%if %{with lttng}
|
||||
%files lttng
|
||||
%{_libdir}/ganesha/libganesha_trace*
|
||||
%endif
|
||||
|
||||
%if %{with utils}
|
||||
%files utils
|
||||
%{python2_sitelib}/Ganesha/*
|
||||
%{python2_sitelib}/ganeshactl-*-info
|
||||
%if %{with gui_utils}
|
||||
%{_bindir}/ganesha-admin
|
||||
%{_bindir}/manage_clients
|
||||
%{_bindir}/manage_exports
|
||||
%{_bindir}/manage_logger
|
||||
%{_bindir}/ganeshactl
|
||||
%{_bindir}/client_stats_9pOps
|
||||
%{_bindir}/export_stats_9pOps
|
||||
%endif
|
||||
%{_bindir}/fake_recall
|
||||
%{_bindir}/get_clientids
|
||||
%{_bindir}/grace_period
|
||||
%{_bindir}/purge_gids
|
||||
%{_bindir}/ganesha_stats
|
||||
%{_bindir}/sm_notify.ganesha
|
||||
%{_bindir}/ganesha_mgr
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Oct 28 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-1
|
||||
- 2.3.0 GA
|
||||
|
||||
* Tue Oct 27 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.15rc8
|
||||
- 2.3.0 RC8, rebuild with libntirpc-1.3.1, again
|
||||
|
||||
* Mon Oct 26 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.14rc8
|
||||
- 2.3.0 RC8, rebuild with libntirpc-1.3.1
|
||||
|
||||
* Sun Oct 25 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.13rc8
|
||||
- 2.3.0 RC8
|
||||
|
||||
* Thu Oct 22 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.12rc7
|
||||
- 2.3.0 RC7 (N.B. 2.3.0-0.11rc6 was really rc7)
|
||||
|
||||
* Mon Oct 19 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.11rc7
|
||||
- 2.3.0 RC7
|
||||
|
||||
* Mon Oct 12 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.10rc6
|
||||
- 2.3.0 RC6
|
||||
|
||||
* Thu Oct 8 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.9rc5
|
||||
- 2.3.0 RC5 w/ CMakeLists.txt.patch and config-h.in.cmake.patch
|
||||
|
||||
* Wed Oct 7 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.8rc5
|
||||
- 2.3.0 RC5 mount-9p w/o Requires: nfs-ganesha
|
||||
|
||||
* Tue Oct 6 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.7rc5
|
||||
- 2.3.0 RC5 revised scripts/ganeshactl/CMakeLists.txt.patch
|
||||
|
||||
* Mon Oct 5 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.6rc5
|
||||
- 2.3.0 RC5
|
||||
|
||||
* Mon Sep 28 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.5rc4
|
||||
- 2.3.0 RC4
|
||||
|
||||
* Fri Sep 18 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.4rc3
|
||||
- 2.3.0 RC3
|
||||
|
||||
* Fri Sep 11 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.3rc2
|
||||
- 2.3.0 RC2
|
||||
|
||||
* Fri Sep 11 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.2rc1
|
||||
- 2.3.0 RC1, revised .../SAL/nfs4_state_id.c.patch
|
||||
|
||||
* Wed Sep 9 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.3.0-0.1rc1
|
||||
- 2.3.0 RC1
|
||||
|
||||
* Sat Aug 29 2015 Niels de Vos <ndevos@redhat.com> 2.2.0-6
|
||||
- Rebuilt for jemalloc SONAME bump
|
||||
|
||||
* Fri Jul 17 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-5
|
||||
- BuildRequires: libntirprc on base
|
||||
|
||||
* Fri Jul 17 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-4
|
||||
- link with unbundled, shared libntirpc
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Wed May 27 2015 Niels de Vos <ndevos@redhat.com>
|
||||
- improve readability and allow "rpmbuild --with .." options again
|
||||
|
||||
* Fri May 15 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-2
|
||||
- %%license, build with glusterfs-3.7.0 GA
|
||||
|
||||
* Tue Apr 21 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-1
|
||||
- 2.2.0 GA
|
||||
|
||||
* Mon Apr 20 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.13rc-final
|
||||
- 2.2.0-0.13rc-final
|
||||
|
||||
* Mon Apr 13 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.12rc8
|
||||
- 2.2.0-0.12rc8
|
||||
|
||||
* Mon Apr 6 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.11rc7
|
||||
- 2.2.0-0.11rc7
|
||||
|
||||
* Thu Apr 2 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.10rc6
|
||||
- 2.2.0-0.10rc6, with unbundled libntirpc
|
||||
|
||||
* Mon Mar 30 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.9rc6
|
||||
- 2.2.0-0.9rc6
|
||||
|
||||
* Sun Mar 22 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.8rc5
|
||||
- 2.2.0-0.8rc5
|
||||
|
||||
* Tue Mar 17 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.7rc4
|
||||
- ntirpc-1.2.1.tar.gz
|
||||
|
||||
* Tue Mar 17 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.6rc4
|
||||
- updated ntirpc-1.2.0.tar.gz
|
||||
|
||||
* Sun Mar 15 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.5rc4
|
||||
- 2.2.0-0.5rc4
|
||||
|
||||
* Mon Feb 23 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.4rc3
|
||||
- 2.2.0-0.4rc3
|
||||
|
||||
* Mon Feb 16 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.3rc2
|
||||
- subpackage Requires: nfs-ganesha = %%{version}-%%{release}
|
||||
|
||||
* Mon Feb 16 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.2rc2
|
||||
- 2.2.0-0.2rc2
|
||||
|
||||
* Fri Feb 13 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.1rc1
|
||||
- 2.2.0-0.1rc1
|
||||
- nfs-ganesha.spec based on upstream
|
||||
|
||||
* Thu Feb 12 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-14
|
||||
- Fedora 23/rawhide build fixes
|
||||
- Ceph restored in EPEL
|
||||
|
||||
* Mon Jan 19 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-13
|
||||
- Ceph retired from EPEL 7
|
||||
|
||||
* Thu Nov 6 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-12
|
||||
- rebuild after libnfsidmap symbol version revert
|
||||
|
||||
* Wed Oct 29 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-11
|
||||
- PyQt -> PyQt4 typo
|
||||
|
||||
* Mon Oct 27 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-10
|
||||
- use upstream init.d script
|
||||
|
||||
* Thu Oct 2 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-9
|
||||
- restore exclusion of gluster gfapi on rhel
|
||||
|
||||
* Thu Oct 2 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-8
|
||||
- install /etc/dbus-1/system.d/org.ganesha.nfsd.conf
|
||||
- build and install admin tools
|
||||
|
||||
* Mon Sep 29 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-7
|
||||
- install /etc/sysconfig/nfs-ganesha file
|
||||
|
||||
* Fri Aug 29 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
|
||||
- Ceph FSAL typo, #1135437
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Thu Jul 24 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-5
|
||||
- use upstream nfs-ganesha.service
|
||||
|
||||
* Fri Jul 11 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-4
|
||||
- keep fsal .so files, implementation now uses them
|
||||
|
||||
* Tue Jul 1 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-3
|
||||
- static libuid2grp
|
||||
|
||||
* Tue Jul 1 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-2
|
||||
- add libuid2grp.so
|
||||
|
||||
* Mon Jun 30 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-1
|
||||
- nfs-ganesha-2.1.0 GA
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Mon Jun 2 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-9
|
||||
- Ceph FSAL enabled with ceph-0.80
|
||||
|
||||
* Wed May 21 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-8
|
||||
- getdents()->getdents64(), struct dirent -> struct dirent64
|
||||
|
||||
* Sat May 10 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
|
||||
- and exclude libfsalceph
|
||||
|
||||
* Sat May 10 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
|
||||
- exclude libfsalgluster correctly
|
||||
|
||||
* Fri May 9 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-7
|
||||
- Ceph FSAL, in a subpackage, (but requires ceph >= 0.78)
|
||||
|
||||
* Mon Mar 31 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
|
||||
- GlusterFS FSAL in a subpackage
|
||||
- EPEL7 has jemalloc as of 2014-02-25
|
||||
|
||||
* Tue Jan 21 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
|
||||
- sussed out github archive so as to allow correct Source0
|
||||
|
||||
* Fri Jan 17 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-6
|
||||
- EPEL7 and xfsprogs
|
||||
|
||||
* Fri Jan 17 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-5
|
||||
- EPEL7
|
||||
|
||||
* Mon Jan 6 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-4
|
||||
- with glusterfs-api(-devel) >= 3.4.2
|
||||
|
||||
* Sat Jan 4 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-3
|
||||
- with glusterfs-api
|
||||
|
||||
* Thu Jan 2 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-2
|
||||
- Build on RHEL6. Add sample init.d script
|
||||
|
||||
* Wed Dec 11 2013 Jim Lieb <lieb@sea-troll.net> - 2.0.0-1
|
||||
- Update to V2.0.0 release
|
||||
|
||||
* Mon Nov 25 2013 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-0.2.rcfinal
|
||||
- update to RC-final
|
||||
|
||||
* Fri Nov 22 2013 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-0.1.rc5
|
||||
- Initial commit
|
390
nfs_ganesha.sh
390
nfs_ganesha.sh
@ -1,390 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
VOLNAME=
|
||||
CONF=
|
||||
IP=
|
||||
LOG=
|
||||
DBGLVL=
|
||||
OPT=
|
||||
FILE1=
|
||||
|
||||
trap cleanup SIGHUP SIGINT SIGTERM
|
||||
|
||||
|
||||
if [ $EUID -ne 0 ]; then
|
||||
echo "You have to be root to run this script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
function usage {
|
||||
echo " Usage : nfs-ganesha.sh [-l <logfile>][-n <dbg_lvl>] -v <volname> -i <ganesha_host_ip> -f <config_file> -o <start|stop>
|
||||
[-h] display this help
|
||||
[-l <logfile>] set the logfile for the daemon
|
||||
[-n <dbg_lvl>] set the verbosity level
|
||||
dbg_lvl options NIV_NULL, NIV_MAJ, NIV_CRIT, NIV_EVENT, NIV_DEBUG, NIV_MID_DEBUG, NIV_FULL_DEBUG
|
||||
-v <volname> name of the volume to be exported
|
||||
-i <ganesha_host_ip> IP of the ganesha host
|
||||
-f <config_file> set the config file to be used
|
||||
-o <start|stop> start or stop ganesha server
|
||||
===========Default Values=============
|
||||
LogFile : /tmp/nfs-ganesha.log
|
||||
DebugLevel : NIV_EVENT"
|
||||
}
|
||||
|
||||
while getopts "hf:i:l:n:v:o: -l help" OPTION
|
||||
do
|
||||
case $OPTION in
|
||||
f) CONF=$OPTARG
|
||||
;;
|
||||
i) IP=$OPTARG
|
||||
;;
|
||||
l) LOG=$OPTARG
|
||||
;;
|
||||
n) DBGLVL=$OPTARG
|
||||
;;
|
||||
h) usage
|
||||
exit 1
|
||||
;;
|
||||
v) VOLNAME=$OPTARG
|
||||
;;
|
||||
o) OPT=$OPTARG
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
function cleanup ()
|
||||
{
|
||||
if [ -f /tmp/old-ganesha.conf ]
|
||||
then cp /tmp/old-ganesha.conf $CONF
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function check_for_stop()
|
||||
{
|
||||
if echo $OPT | grep -i -q "stop"
|
||||
then stop_ganesha
|
||||
fi
|
||||
}
|
||||
|
||||
function check_usage()
|
||||
{
|
||||
|
||||
if [ "$VOLNAME" = "" ]
|
||||
then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
if [ "$CONF" = "" ]
|
||||
then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
if [ "$IP" = "" ]
|
||||
then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
if [ "$OPT" = "" ]
|
||||
then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
function check_ip {
|
||||
if [[ ! $IP =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
||||
echo "Invalid IP , please enter the correct IP of the ganesha host."
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function check_volname
|
||||
{
|
||||
if ! ls /var/lib/glusterd/vols | grep -q "$VOLNAME" ; then
|
||||
echo "Volume doesn't exist. Please enter a valid volume name."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function check_conf
|
||||
|
||||
|
||||
{
|
||||
|
||||
if ! [ -f "$CONF" ]; then
|
||||
echo "The config_file $CONF doesn't exist."
|
||||
usage
|
||||
exit 1
|
||||
else
|
||||
if ! [ -s "$CONF" ]; then
|
||||
echo "The cofig_file $CONF is empty "
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function check_option
|
||||
{
|
||||
if ! echo $OPT | grep -i -q -e "start" -q -e "stop"
|
||||
then
|
||||
echo "Invalid value for option 'o': start or stop expected"
|
||||
exit 1
|
||||
else if echo $OPT | grep -i -q "start"
|
||||
then
|
||||
OPT="start"
|
||||
else
|
||||
OPT="stop"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function check_debug
|
||||
{
|
||||
if [ "$DBGLVL" = "" ] ; then
|
||||
DBGLVL="NIV_EVENT"
|
||||
else
|
||||
if ! echo $DBGLVL | grep -q -e " NIV_NULL" -q -e "NIV_MAJOR" -q -e " NIV_CRIT" -q -e "NIV_EVENT" -q -e "NIV_DEBUG" -q -e "NIV_FULL_DEBUG"
|
||||
then
|
||||
echo "Invalid value for option 'n': NIV_NULL, NIV_MAJ, NIV_CRIT, NIV_EVENT, NIV_DEBUG, NIV_MID_DEBUG or NIV_FULL_DEBUG expected."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
function check_logfile
|
||||
{
|
||||
if [ "$LOG" = "" ]; then
|
||||
LOG="/tmp/nfs-ganesha.log"
|
||||
else if [ -f $LOG ]
|
||||
then
|
||||
cp $LOG /tmp/old-ganesha.log
|
||||
FILE1="1"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function call_checks
|
||||
{
|
||||
check_ip
|
||||
check_conf
|
||||
cp $CONF /tmp/old-ganesha.conf
|
||||
|
||||
check_debug
|
||||
check_logfile
|
||||
check_option
|
||||
check_volname
|
||||
}
|
||||
function check_glusterd()
|
||||
{
|
||||
|
||||
if ! ps aux | grep -q -e "[g]lusterd$" -q -e "[g]lusterd.pid"
|
||||
then
|
||||
echo "glusterd not started , please start glusterd. "
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function check_bricks()
|
||||
{
|
||||
gluster volume status $VOLUME | grep -q "N/A"
|
||||
if [ "$?" -eq 0 ]
|
||||
then
|
||||
echo "Brick(s) not online , please check $VOLUME volume status"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function check_glusternfs
|
||||
{
|
||||
if echo "$(ls /var/lib/glusterd/vols | wc -l)" | grep -q "1" ; then
|
||||
if ps aux | grep -q "[g]luster/nfs" ; then
|
||||
echo "gluster-nfs server is active, needs to be disabled to proceed. "
|
||||
while true; do
|
||||
read -p "Do you wish to disable gluster-nfs server ? [Y\N]" yn
|
||||
case $yn in
|
||||
[Yy]* ) gluster volume set $VOLNAME nfs.disable ON >/dev/null 2>/dev/null; break;;
|
||||
[Nn]* ) exit 1;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
sleep 2
|
||||
if ps aux | grep -q "[g]luster/nfs" ; then
|
||||
echo "Volume set unsuccessful , please try disabling gluster-nfs server "
|
||||
exit 1
|
||||
fi
|
||||
sleep 2
|
||||
if rpcinfo -p | grep -q -e "nfs_acl" ; then
|
||||
echo " gluster-nfs ports still in use; please try again"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
else
|
||||
if ps aux | grep -q "[g]luster/nfs"; then
|
||||
echo "Please disable gluster-nfs servers on all the volumes"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function check_kernelnfs()
|
||||
{
|
||||
service nfs status | grep -q -e "dead" -q -e "stopped" -q -e "disabled"
|
||||
if [ "$?" -eq 1 ]; then
|
||||
echo "kernel-NFS server is active , it needs to disabled to proceed. "
|
||||
while true; do
|
||||
read -p "Do you wish to disable kernel-nfs server ? [Y\N]" yn
|
||||
case $yn in
|
||||
[Yy]* ) service nfs stop; break;;
|
||||
[Nn]* ) exit 1;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
sleep 2
|
||||
service nfs status | grep -q -e "dead" -q -e "stopped" -q -e "inactive" >>/dev/null
|
||||
if [ "$?" -eq 1 ]; then
|
||||
echo " kernel-NFS server couldn't be disabled , please try again"
|
||||
exit 1
|
||||
else
|
||||
echo "kernel-NFS server successfully disabled"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function check_volstart()
|
||||
{
|
||||
|
||||
if ! cat /var/lib/glusterd/vols/$1/info | grep -q "status=1"
|
||||
then
|
||||
echo "Volume $1 is not started, please start the volume."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function check_ganesha
|
||||
{
|
||||
if ps aux | grep -q "[g]anesha.nfsd" ; then
|
||||
echo "NFS-ganesha server is already active , nothing to do."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function check_ports
|
||||
{
|
||||
if netstat -an | grep -q "2049$" ; then
|
||||
echo "Port 2049 is already in use , exiting"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function check_fsal
|
||||
{
|
||||
|
||||
if ! ls /usr/lib64/ganesha | grep -q "libfsalgluster.so" ; then
|
||||
echo "Cannot find shared object libfsalgluster.so , exiting"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function start_ganesha
|
||||
{
|
||||
check_ganesha
|
||||
#check_rpms
|
||||
check_fsal
|
||||
check_glusterd
|
||||
check_volstart $1
|
||||
check_kernelnfs
|
||||
check_glusternfs $1
|
||||
check_ports
|
||||
check_conf $3
|
||||
check_bricks $1
|
||||
sed -i /^[[:space:]]*\#/!s/volume.*/"volume=$1,hostname=$2\";"/ $3
|
||||
sed -i /^[[:space:]]*\#/!s/Pseudo.*/Pseudo="\"\/$1\";"/ $3
|
||||
sed -i s/Path.*/Path="\"\/$1\";"/ $3
|
||||
sed -i 's/\r//g' $3
|
||||
/usr/bin/ganesha.nfsd -f $CONF -L $LOG -N $DBGLVL -d >/dev/null 2>/dev/null
|
||||
|
||||
sleep 5
|
||||
|
||||
}
|
||||
|
||||
|
||||
function stop_ganesha
|
||||
{
|
||||
if ! ps aux | grep -q "[g]anesha.nfsd" ; then
|
||||
echo "NFS-ganesha server already inactive,nothing to do."
|
||||
exit 1
|
||||
fi
|
||||
kill -9 `cat /var/run/ganesha.pid`
|
||||
if ps aux | ganesha.nfsd ; then
|
||||
if rpcinfo -p | grep -q -e "nfs" ; then
|
||||
echo "NFS-ganesha server could not be stopped, please try again"
|
||||
fi
|
||||
else
|
||||
echo " NFS-ganesha server is now inactive."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
function check_for_stop()
|
||||
{
|
||||
if echo $OPT | grep -i -q "stop"
|
||||
then stop_ganesha
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
check_for_stop
|
||||
check_usage
|
||||
call_checks
|
||||
|
||||
if [ "$OPT" = "start" ]
|
||||
then
|
||||
start_ganesha $VOLNAME $IP $CONF
|
||||
if ! ps aux | grep -q "[g]anesha.nfsd" ; then
|
||||
start_ganesha $VOLNAME $IP $CONF
|
||||
fi
|
||||
sleep 5
|
||||
if ! ps aux | grep -q "[g]anesha.nfsd"
|
||||
then
|
||||
if [ "$FILE1" = "1" ]
|
||||
then
|
||||
cp /tmp/old-ganesha.log $LOG
|
||||
rm -rf /tmp/ganesha.log
|
||||
fi
|
||||
cp /tmp/old-ganesha.conf $CONF
|
||||
rm -rf /tmp/ganesha.conf
|
||||
echo "Failed to start NFS-ganesha server , please see $LOG for details"
|
||||
else
|
||||
echo ""
|
||||
echo "NFS-ganesha server started."
|
||||
echo "============Volume exports============"
|
||||
showmount -e $IP
|
||||
echo "======================================"
|
||||
rm -rf /tmp/old-ganesha.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$OPT" = "stop" ]
|
||||
then
|
||||
stop_ganesha
|
||||
exit 0
|
||||
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user