diff options
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
| -rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 16 | 
1 files changed, 16 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 3545c0f99..97a2bd016 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -244,6 +244,22 @@ typedef struct dht_disk_layout dht_disk_layout_t;                  ((st_mode_from_ia (s->ia_prot, s->ia_type) & ~S_IFMT)   \                   == DHT_LINKFILE_MODE)) +#define IS_DHT_MIGRATION_PHASE2(buf)  (                                 \ +                IA_ISREG ((buf)->ia_type) &&                            \ +                ((st_mode_from_ia ((buf)->ia_prot, (buf)->ia_type) &    \ +                  ~S_IFMT) == DHT_LINKFILE_MODE)) + +#define IS_DHT_MIGRATION_PHASE1(buf)  (                                 \ +                IA_ISREG ((buf)->ia_type) &&                            \ +                ((buf)->ia_prot.sticky == 1) &&                         \ +                ((buf)->ia_prot.sgid == 1)) + +#define DHT_STRIP_PHASE1_FLAGS(buf)  do {               \ +                if (IS_DHT_MIGRATION_PHASE1(buf)) {     \ +                        (buf)->ia_prot.sticky = 0;      \ +                        (buf)->ia_prot.sgid = 0;        \ +                }                                       \ +        } while (0)  #define check_is_dir(i,s,x) (IA_ISDIR(s->ia_type))  | 
