nfs-ganesha/nfs-ganesha-2.3rc2-jumbo.patch
Kaleb S. KEITHLEY 98765927f8 2.3.0 RC2
2015-09-13 07:21:22 -04:00

685 lines
25 KiB
Diff

--- 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(&current_grace, current_time);
+ atomic_store_time_t(&current_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;