master - activation: Skip another non-prefixed info ioctl.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f40dfb48ad0114c89ac5fc0a8670a3792565e9a9 Commit: f40dfb48ad0114c89ac5fc0a8670a3792565e9a9 Parent: e6768997e192e26aaf091b6ed2700a3391f178b5 Author: Alasdair G Kergon <[email protected]> AuthorDate: Fri Apr 8 16:27:12 2016 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Fri Apr 8 16:27:12 2016 +0100
activation: Skip another non-prefixed info ioctl.
_percent() also does a lookup by dm uuid.
Also get kernel version from cmd->kernel_vsn.
--- lib/activate/activate.c | 4 +- lib/activate/dev_manager.c | 60 ++++++++++++++++++++++++------------------- lib/activate/dev_manager.h | 3 +- 3 files changed, 37 insertions(+), 30 deletions(-)
lib/activate/activate.c +2 -2
@@ -660,7 +660,7 @@ static int _lv_info(struct cmd_context *cmd, const struct logical_volume *lv,/* New thin-pool has no layer, but -tpool suffix needs to be queried */ if (!use_layer &&lv_is_new_thin_pool (lv)) {/* Check if there isn't existing old thin pool mapping in the table */ -if (!dev_manager_info (cmd->mem, lv,NULL ,0 ,0 , &dminfo,NULL ,NULL )) +if (!dev_manager_info (cmd, lv,NULL ,0 ,0 , &dminfo,NULL ,NULL )) return_0;if (!dminfo.exists) use_layer =1 ;
@@ -669,7 +669,7 @@ static int _lv_info(struct cmd_context *cmd, const struct logical_volume *lv,if (seg_status) seg_status->seg = seg; - if (!dev_manager_info(cmd->mem, lv, + if (!dev_manager_info(cmd, lv, (use_layer) ? lv_layer(lv) : NULL, with_open_count, with_read_ahead, &dminfo, (info) ? &info->read_ahead : NULL,
lib/activate/dev_manager.c +32 -26
127 lines not on this page · raw message
lib/activate/dev_manager.h +2 -1
@@ -45,11 +45,12 @@ void dev_manager_exit(void);* (eg, an origin is created before its snapshot, but is not * unsuspended until the snapshot is also created.) */ -int dev_manager_info (struct dm_pool *mem,const struct logical_volume *lv, +int dev_manager_info (struct cmd_context *cmd,const struct logical_volume *lv,const char *layer,int with_open_count,int with_read_ahead,struct dm_info *dminfo,uint32_t *read_ahead,struct lv_seg_status *seg_status); +int dev_manager_snapshot_percent (struct dev_manager *dm,const struct logical_volume *lv,dm_percent_t *percent);