diff options
author | Neil Brown <neilb@suse.de> | 2005-08-09 06:25:47 +0200 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2005-08-09 06:25:47 +0200 |
commit | dfd4d8ee426fb71a369f494f95fe95b114a33c7c (patch) | |
tree | 616d0864cc8cb08085cb72b6ad5ccc545cd8b6a5 /bitmap.h | |
parent | Support fixing of byte-swapped superblocks. (diff) | |
download | mdadm-dfd4d8ee426fb71a369f494f95fe95b114a33c7c.tar.xz mdadm-dfd4d8ee426fb71a369f494f95fe95b114a33c7c.zip |
Add write-behind support
Currently this includes
--write-behind to set level of write-behind supported
--write-mostly to flag devices as write-mostly.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Diffstat (limited to 'bitmap.h')
-rw-r--r-- | bitmap.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -7,7 +7,7 @@ #define BITMAP_H 1 #define BITMAP_MAJOR 3 -#define BITMAP_MINOR 38 +#define BITMAP_MINOR 39 /* * in-memory bitmap: @@ -43,6 +43,13 @@ * When we set a bit, or in the counter (to start a write), if the fields is * 0, we first set the disk bit and set the counter to 1. * + * If the counter is 0, the on-disk bit is clear and the stipe is clean + * Anything that dirties the stipe pushes the counter to 2 (at least) + * and sets the on-disk bit (lazily). + * If a periodic sweep find the counter at 2, it is decremented to 1. + * If the sweep find the counter at 1, the on-disk bit is cleared and the + * counter goes to zero. + * * Also, we'll hijack the "map" pointer itself and use it as two 16 bit block * counters as a fallback when "page" memory cannot be allocated: * @@ -140,8 +147,9 @@ typedef struct bitmap_super_s { __u32 state; /* 48 bitmap state information */ __u32 chunksize; /* 52 the bitmap chunk size in bytes */ __u32 daemon_sleep; /* 56 seconds between disk flushes */ + __u32 write_behind; /* 60 number of outstanding write-behind writes */ - __u8 pad[256 - 60]; /* set to zero */ + __u8 pad[256 - 64]; /* set to zero */ } bitmap_super_t; /* notes: |