summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix.h
diff options
context:
space:
mode:
authorAnand V. Avati <avati@blackhole.gluster.com>2009-10-16 07:30:26 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-16 06:22:21 -0700
commitd56c6a81ba22e5caca68bfa6fc0eb5f3079c9d22 (patch)
treee55f4a7be201ca265c0827baac865c7b3e757cf9 /xlators/storage/posix/src/posix.h
parent355150088d688fafd82c54af80a583a26732d0da (diff)
posix - generation number support
- use sequential gen counter - move span_devices handling and generation assignment to common functions Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
Diffstat (limited to 'xlators/storage/posix/src/posix.h')
-rw-r--r--xlators/storage/posix/src/posix.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h
index 156bad85ae5..b16800c5c93 100644
--- a/xlators/storage/posix/src/posix.h
+++ b/xlators/storage/posix/src/posix.h
@@ -29,6 +29,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <dirent.h>
+#include <time.h>
#ifdef linux
#ifdef __GLIBC__
@@ -107,6 +108,12 @@ struct posix_private {
int num_devices_to_span;
dev_t *st_device;
+
+/* a global generation number sequence is used to assign generation numbers in
+ sequence.
+*/
+ uint64_t gen_seq;
+ gf_lock_t gen_lock;
};
#define POSIX_BASE_PATH(this) (((struct posix_private *)this->private)->base_path)