[era_invalidate] Don't open in exclusive mode if using a metadata snap.
Patch from bobk-rey on github
This commit is contained in:
		| @@ -152,7 +152,7 @@ namespace { | |||||||
| 	int invalidate(string const &dev, string const &output, flags const &fs) { | 	int invalidate(string const &dev, string const &output, flags const &fs) { | ||||||
| 		try { | 		try { | ||||||
| 			set<uint32_t> blocks; | 			set<uint32_t> blocks; | ||||||
| 			block_manager<>::ptr bm = open_bm(dev, block_manager<>::READ_ONLY); | 			block_manager<>::ptr bm = open_bm(dev, block_manager<>::READ_ONLY, !fs.metadata_snapshot_); | ||||||
|  |  | ||||||
| 			if (fs.metadata_snapshot_) { | 			if (fs.metadata_snapshot_) { | ||||||
| 				superblock sb = read_superblock(bm); | 				superblock sb = read_superblock(bm); | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ era_invalidate \- Provide a list of blocks that have changed since a particular | |||||||
| .B era_invalidate | .B era_invalidate | ||||||
| Examines era metadata and lists blocks that may have changed since a given era. | Examines era metadata and lists blocks that may have changed since a given era. | ||||||
|  |  | ||||||
| This tool cannot be run on live metadata. | This tool cannot be run on live metadata unless the \fB\-\-metadata\-snap\fP option is used. | ||||||
|  |  | ||||||
| .SH OPTIONS | .SH OPTIONS | ||||||
| .IP "\fB\-h, \-\-help\fP" | .IP "\fB\-h, \-\-help\fP" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user