Re: [PATCH 2/7] btrfs: btrfs_issue_discard ensure offset/length are aligned to sector boundaries

2015-06-17 Thread Filipe David Manana
On Mon, Jun 15, 2015 at 2:41 PM, wrote: > From: Jeff Mahoney > > It's possible, though unexpected, to pass unaligned offsets and lengths > to btrfs_issue_discard. We then shift the offset/length values to sector > units. If an unaligned offset has been passed, it will result in the > entire se

[PATCH 2/7] btrfs: btrfs_issue_discard ensure offset/length are aligned to sector boundaries

2015-06-15 Thread jeffm
From: Jeff Mahoney It's possible, though unexpected, to pass unaligned offsets and lengths to btrfs_issue_discard. We then shift the offset/length values to sector units. If an unaligned offset has been passed, it will result in the entire sector being discarded, possibly losing data. An unali