Commit 11550af
btrfs-progs: mkfs: do zeroing before discard
mkfs.btrfs clears the very beginning and very end of a block device, to
prevent it from potentially being identified as another filesystem.
Change btrfs_prepare_device() so that this happens immediately before the
whole-device discard, rather than afterwards. This means that the contents
of these regions is either all zeroes (if discard did nothing) or indeterminate
(if discard was effective): either way it's clearing the other filesystem's
markers.
Pull-request: #1021
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 16ee6b5 commit 11550af
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
282 | 280 | | |
283 | 281 | | |
284 | 282 | | |
| |||
295 | 293 | | |
296 | 294 | | |
297 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
| |||
0 commit comments