diff options
Diffstat (limited to 'xlators/features/snapview-server/src/snapview-server.h')
| -rw-r--r-- | xlators/features/snapview-server/src/snapview-server.h | 19 | 
1 files changed, 19 insertions, 0 deletions
diff --git a/xlators/features/snapview-server/src/snapview-server.h b/xlators/features/snapview-server/src/snapview-server.h index c80d3456c30..f9249f9d828 100644 --- a/xlators/features/snapview-server/src/snapview-server.h +++ b/xlators/features/snapview-server/src/snapview-server.h @@ -105,6 +105,17 @@                  }                                                       \          } while(0); +#define SVS_STRDUP(dst, src)                                            \ +        do {                                                            \ +                if (dst && strcmp (src, dst)) {                         \ +                        GF_FREE (dst);                                  \ +                        dst = NULL;                                     \ +                }                                                       \ +                                                                        \ +                if (!dst)                                               \ +                        dst = gf_strdup (src);                          \ +        } while (0) +  int  svs_mgmt_submit_request (void *req, call_frame_t *frame,                           glusterfs_ctx_t *ctx, @@ -133,6 +144,11 @@ struct svs_inode {             from where the entry point was entered is saved.          */          uuid_t pargfid; + +        /* This is used to generate gfid for all sub files/dirs under this +         * snapshot +         */ +        char *snapname;          struct iatt buf;  };  typedef struct svs_inode svs_inode_t; @@ -194,6 +210,9 @@ svs_fd_t *  svs_fd_ctx_get_or_new (xlator_t *this, fd_t *fd);  void +svs_uuid_generate (uuid_t gfid, char *snapname, uuid_t origin_gfid); + +void  svs_fill_ino_from_gfid (struct iatt *buf);  void  | 
