nfs-ganesha 1.4

common_functions.c

Go to the documentation of this file.
00001 /*
00002  * Common FSAL functions
00003  */
00004 
00005 #ifdef HAVE_CONFIG_H
00006 #include "config.h"
00007 #endif
00008 
00009 #define fsal_increment_nbcall( _f_,_struct_status_ )
00010 
00011 #include <sys/types.h>
00012 #include <stdint.h>
00013 #include <stddef.h>
00014 #include <stdlib.h>
00015 #include <errno.h>
00016 #include <string.h>
00017 #include <pthread.h>
00018 #include <sys/quota.h>
00019 #include "log.h"
00020 #include "fsal.h"
00021 #include "FSAL/common_functions.h"
00022 
00023 /* Internal and misc functions used by all/most FSALs
00024  */
00025 
00026 void display_fsinfo(fsal_staticfsinfo_t *info) {
00027         LogDebug(COMPONENT_FSAL, "FileSystem info: {");
00028         LogDebug(COMPONENT_FSAL, "  maxfilesize  = %zX    ",
00029                  info->maxfilesize);
00030         LogDebug(COMPONENT_FSAL, "  maxlink  = %lu   ",
00031                  info->maxlink);
00032         LogDebug(COMPONENT_FSAL, "  maxnamelen  = %lu  ",
00033                  info->maxnamelen);
00034         LogDebug(COMPONENT_FSAL, "  maxpathlen  = %lu  ",
00035                  info->maxpathlen);
00036         LogDebug(COMPONENT_FSAL, "  no_trunc  = %d ",
00037                  info->no_trunc);
00038         LogDebug(COMPONENT_FSAL, "  chown_restricted  = %d ",
00039                  info->chown_restricted);
00040         LogDebug(COMPONENT_FSAL, "  case_insensitive  = %d ",
00041                  info->case_insensitive);
00042         LogDebug(COMPONENT_FSAL, "  case_preserving  = %d ",
00043                  info->case_preserving);
00044         LogDebug(COMPONENT_FSAL, "  fh_expire_type  = %hu ",
00045                  info->fh_expire_type);
00046         LogDebug(COMPONENT_FSAL, "  link_support  = %d  ",
00047                  info->link_support);
00048         LogDebug(COMPONENT_FSAL, "  symlink_support  = %d  ",
00049                  info->symlink_support);
00050         LogDebug(COMPONENT_FSAL, "  lock_support  = %d  ",
00051                  info->lock_support);
00052         LogDebug(COMPONENT_FSAL, "  lock_support_owner  = %d  ",
00053                  info->lock_support_owner);
00054         LogDebug(COMPONENT_FSAL, "  lock_support_async_block  = %d  ",
00055                  info->lock_support_async_block);
00056         LogDebug(COMPONENT_FSAL, "  named_attr  = %d  ",
00057                  info->named_attr);
00058         LogDebug(COMPONENT_FSAL, "  unique_handles  = %d  ",
00059                  info->unique_handles);
00060         LogDebug(COMPONENT_FSAL, "  acl_support  = %hu  ",
00061                  info->acl_support);
00062         LogDebug(COMPONENT_FSAL, "  cansettime  = %d  ",
00063                  info->cansettime);
00064         LogDebug(COMPONENT_FSAL, "  homogenous  = %d  ",
00065                  info->homogenous);
00066         LogDebug(COMPONENT_FSAL, "  supported_attrs  = %llX  ",
00067                  info->supported_attrs);
00068         LogDebug(COMPONENT_FSAL, "  maxread  = %zX     ",
00069                  info->maxread);
00070         LogDebug(COMPONENT_FSAL, "  maxwrite  = %zX     ",
00071                  info->maxwrite);
00072         LogDebug(COMPONENT_FSAL, "  umask  = %X ", info->umask);
00073         LogDebug(COMPONENT_FSAL, "  auth_exportpath_xdev  = %d  ",
00074                  info->auth_exportpath_xdev);
00075         LogDebug(COMPONENT_FSAL, "  xattr_access_rights = %#o ",
00076                  info->xattr_access_rights);
00077         LogDebug(COMPONENT_FSAL, "  accesscheck_support  = %d  ",
00078                  info->accesscheck_support);
00079         LogDebug(COMPONENT_FSAL, "  share_support  = %d  ",
00080                  info->share_support);
00081         LogDebug(COMPONENT_FSAL, "  share_support_owner  = %d  ",
00082                  info->share_support_owner);
00083         LogDebug(COMPONENT_FSAL, "}");
00084 }
00085