summaryrefslogtreecommitdiffstats
path: root/xlators/features/gfid-access/src
diff options
context:
space:
mode:
authorGluster Ant <bugzilla-bot@gluster.org>2018-09-12 17:22:48 +0530
committerNigel Babu <nigelb@redhat.com>2018-09-12 17:22:48 +0530
commit45a71c0548b6fd2c757aa2e7b7671a1411948894 (patch)
tree2a5a9b73bae47ab53a41166fd041a06612587f48 /xlators/features/gfid-access/src
parentbe77dbbda692792335a8e9e7c02e0c281f003c40 (diff)
Land clang-format changes
Change-Id: I6f5d8140a06f3c1b2d196849299f8d483028d33b
Diffstat (limited to 'xlators/features/gfid-access/src')
-rw-r--r--xlators/features/gfid-access/src/gfid-access-mem-types.h7
-rw-r--r--xlators/features/gfid-access/src/gfid-access.h122
2 files changed, 64 insertions, 65 deletions
diff --git a/xlators/features/gfid-access/src/gfid-access-mem-types.h b/xlators/features/gfid-access/src/gfid-access-mem-types.h
index 168d67b431f..ee7fd794da8 100644
--- a/xlators/features/gfid-access/src/gfid-access-mem-types.h
+++ b/xlators/features/gfid-access/src/gfid-access-mem-types.h
@@ -14,10 +14,9 @@
#include "mem-types.h"
enum gf_changelog_mem_types {
- gf_gfid_access_mt_priv_t = gf_common_mt_end + 1,
- gf_gfid_access_mt_gfid_t,
- gf_gfid_access_mt_end
+ gf_gfid_access_mt_priv_t = gf_common_mt_end + 1,
+ gf_gfid_access_mt_gfid_t,
+ gf_gfid_access_mt_end
};
#endif
-
diff --git a/xlators/features/gfid-access/src/gfid-access.h b/xlators/features/gfid-access/src/gfid-access.h
index 2b5e4fd4184..68ebe539564 100644
--- a/xlators/features/gfid-access/src/gfid-access.h
+++ b/xlators/features/gfid-access/src/gfid-access.h
@@ -20,87 +20,87 @@
#define UUID_CANONICAL_FORM_LEN 36
#define GF_FUSE_AUX_GFID_NEWFILE "glusterfs.gfid.newfile"
-#define GF_FUSE_AUX_GFID_HEAL "glusterfs.gfid.heal"
+#define GF_FUSE_AUX_GFID_HEAL "glusterfs.gfid.heal"
#define GF_GFID_KEY "GLUSTERFS_GFID"
#define GF_GFID_DIR ".gfid"
#define GF_AUX_GFID 0xd
-#define GFID_ACCESS_ENTRY_OP_CHECK(loc,err,lbl) do { \
- /* need to check if the lookup is on virtual dir */ \
- if ((loc->name && !strcmp (GF_GFID_DIR, loc->name)) && \
- ((loc->parent && \
- __is_root_gfid (loc->parent->gfid)) || \
- __is_root_gfid (loc->pargfid))) { \
- err = ENOTSUP; \
- goto lbl; \
- } \
- \
- /* now, check if the lookup() is on an existing */ \
- /* entry, but on gfid-path */ \
- if ((loc->parent && \
- __is_gfid_access_dir (loc->parent->gfid)) || \
- __is_gfid_access_dir (loc->pargfid)) { \
- err = EPERM; \
- goto lbl; \
- } \
- } while (0)
+#define GFID_ACCESS_ENTRY_OP_CHECK(loc, err, lbl) \
+ do { \
+ /* need to check if the lookup is on virtual dir */ \
+ if ((loc->name && !strcmp(GF_GFID_DIR, loc->name)) && \
+ ((loc->parent && __is_root_gfid(loc->parent->gfid)) || \
+ __is_root_gfid(loc->pargfid))) { \
+ err = ENOTSUP; \
+ goto lbl; \
+ } \
+ \
+ /* now, check if the lookup() is on an existing */ \
+ /* entry, but on gfid-path */ \
+ if ((loc->parent && __is_gfid_access_dir(loc->parent->gfid)) || \
+ __is_gfid_access_dir(loc->pargfid)) { \
+ err = EPERM; \
+ goto lbl; \
+ } \
+ } while (0)
-#define GFID_ACCESS_INODE_OP_CHECK(loc,err,lbl) do { \
- /*Check if it is on .gfid*/ \
- if (__is_gfid_access_dir(loc->gfid)) { \
- err = ENOTSUP; \
- goto lbl; \
- } \
- } while (0)
+#define GFID_ACCESS_INODE_OP_CHECK(loc, err, lbl) \
+ do { \
+ /*Check if it is on .gfid*/ \
+ if (__is_gfid_access_dir(loc->gfid)) { \
+ err = ENOTSUP; \
+ goto lbl; \
+ } \
+ } while (0)
typedef struct {
- unsigned int uid;
- unsigned int gid;
- char gfid[UUID_CANONICAL_FORM_LEN + 1];
- unsigned int st_mode;
- char *bname;
+ unsigned int uid;
+ unsigned int gid;
+ char gfid[UUID_CANONICAL_FORM_LEN + 1];
+ unsigned int st_mode;
+ char *bname;
- union {
- struct _symlink_in {
- char *linkpath;
- } __attribute__ ((__packed__)) symlink;
+ union {
+ struct _symlink_in {
+ char *linkpath;
+ } __attribute__((__packed__)) symlink;
- struct _mknod_in {
- unsigned int mode;
- unsigned int rdev;
- unsigned int umask;
- } __attribute__ ((__packed__)) mknod;
+ struct _mknod_in {
+ unsigned int mode;
+ unsigned int rdev;
+ unsigned int umask;
+ } __attribute__((__packed__)) mknod;
- struct _mkdir_in {
- unsigned int mode;
- unsigned int umask;
- } __attribute__ ((__packed__)) mkdir;
- } __attribute__ ((__packed__)) args;
+ struct _mkdir_in {
+ unsigned int mode;
+ unsigned int umask;
+ } __attribute__((__packed__)) mkdir;
+ } __attribute__((__packed__)) args;
} __attribute__((__packed__)) ga_newfile_args_t;
typedef struct {
- char gfid[UUID_CANONICAL_FORM_LEN + 1];
- char *bname; /* a null terminated basename */
+ char gfid[UUID_CANONICAL_FORM_LEN + 1];
+ char *bname; /* a null terminated basename */
} __attribute__((__packed__)) ga_heal_args_t;
struct ga_private {
- /* root inode's stbuf */
- struct iatt root_stbuf;
- struct iatt gfiddir_stbuf;
- struct mem_pool *newfile_args_pool;
- struct mem_pool *heal_args_pool;
+ /* root inode's stbuf */
+ struct iatt root_stbuf;
+ struct iatt gfiddir_stbuf;
+ struct mem_pool *newfile_args_pool;
+ struct mem_pool *heal_args_pool;
};
typedef struct ga_private ga_private_t;
struct __ga_local {
- call_frame_t *orig_frame;
- unsigned int uid;
- unsigned int gid;
- loc_t loc;
- mode_t mode;
- dev_t rdev;
- mode_t umask;
- dict_t *xdata;
+ call_frame_t *orig_frame;
+ unsigned int uid;
+ unsigned int gid;
+ loc_t loc;
+ mode_t mode;
+ dev_t rdev;
+ mode_t umask;
+ dict_t *xdata;
};
typedef struct __ga_local ga_local_t;