diff options
| author | Raghavendra G <raghavendra@gluster.com> | 2009-09-10 07:41:14 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2009-09-13 22:10:38 -0700 | 
| commit | 62d30db76e118cb244c35b6acc15005474d77750 (patch) | |
| tree | 6a8eac18e3c1d9d81c624a97b11d19ee3a1388fa /libglusterfs | |
| parent | dd149ca8e7757e6e935c6481be8fd4fee9d13790 (diff) | |
backport stat-prefetch from 2.1
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 257 (Backport stat-prefetch to 2.0)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=257
Diffstat (limited to 'libglusterfs')
| -rw-r--r-- | libglusterfs/src/common-utils.h | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index c90342f7a3d..248efc83c0c 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -116,6 +116,15 @@ extern char *gf_cbk_list[GF_CBK_MAXVALUE];  		}						\  	} while (0);  +#define GF_VALIDATE_OR_GOTO_WITH_ERROR(name, arg, label, error) do { \ +                if (!arg) {                                          \ +                        errno = error;                               \ +                        gf_log (name, GF_LOG_ERROR,                  \ +                                "invalid argument: " #arg);          \ +                        goto label;                                  \ +                }                                                    \ +        }while (0); +  #define GF_VALIDATE_ABSOLUTE_PATH_OR_GOTO(name,arg,label)       \          do {                                                    \                  GF_VALIDATE_OR_GOTO (name, arg, label);         \  | 
