dm snapshot: test chunk size against both origin and snapshot
Validate chunk size against both origin and snapshot sector size Don't allow chunk size smaller than either origin or snapshot logical sector size. Reading or writing data not aligned to sector size is not allowed and causes immediate errors. This requires us to open the origin before initialising the exception store and to export dm_snap_origin. Cc: stable@kernel.org Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Reviewed-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
committed by
Alasdair G Kergon
parent
1e5554c842
commit
c241104506
@@ -126,8 +126,9 @@ struct dm_exception_store {
|
||||
};
|
||||
|
||||
/*
|
||||
* Obtain the cow device used by a given snapshot.
|
||||
* Obtain the origin or cow device used by a given snapshot.
|
||||
*/
|
||||
struct dm_dev *dm_snap_origin(struct dm_snapshot *snap);
|
||||
struct dm_dev *dm_snap_cow(struct dm_snapshot *snap);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user