aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-12-13 20:49:55 -0500
committerNeilBrown <neilb@suse.de>2009-12-13 20:51:41 -0500
commit43a705076e51c5af21ec4260a35699775ea298f5 (patch)
treeff8e161d841c41992dbbcca2a844816411941c3c /drivers/md/md.h
parent72e02075a33f739e21430262f71da8e82db9dbb3 (diff)
md: support updating bitmap parameters via sysfs.
A new attribute directory 'bitmap' in 'md' is created which contains files for configuring the bitmap. 'location' identifies where the bitmap is, either 'none', or 'file' or 'sector offset from metadata'. Writing 'location' can create or remove a bitmap. Adding a 'file' bitmap this way is not yet supported. 'chunksize' and 'time_base' must be set before 'location' can be set. 'chunksize' can be set before creating a bitmap, but is currently always over-ridden by the bitmap superblock. 'time_base' and 'backlog' can be updated at any time. Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Andre Noll <maan@systemlinux.org>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r--drivers/md/md.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h
index b5c306925d94..fce02073f1a4 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@ -372,7 +372,7 @@ struct md_sysfs_entry {
372 ssize_t (*show)(mddev_t *, char *); 372 ssize_t (*show)(mddev_t *, char *);
373 ssize_t (*store)(mddev_t *, const char *, size_t); 373 ssize_t (*store)(mddev_t *, const char *, size_t);
374}; 374};
375 375extern struct attribute_group md_bitmap_group;
376 376
377static inline char * mdname (mddev_t * mddev) 377static inline char * mdname (mddev_t * mddev)
378{ 378{
@@ -465,5 +465,6 @@ extern int md_check_no_bitmap(mddev_t *mddev);
465extern int md_integrity_register(mddev_t *mddev); 465extern int md_integrity_register(mddev_t *mddev);
466extern void md_integrity_add_rdev(mdk_rdev_t *rdev, mddev_t *mddev); 466extern void md_integrity_add_rdev(mdk_rdev_t *rdev, mddev_t *mddev);
467extern int strict_strtoul_scaled(const char *cp, unsigned long *res, int scale); 467extern int strict_strtoul_scaled(const char *cp, unsigned long *res, int scale);
468extern void restore_bitmap_write_access(struct file *file);
468 469
469#endif /* _MD_MD_H */ 470#endif /* _MD_MD_H */