summaryrefslogtreecommitdiffstats
path: root/module/zfs/zpl_xattr.c
diff options
context:
space:
mode:
authorEtienne Dechamps <[email protected]>2012-10-04 10:38:55 +0200
committerBrian Behlendorf <[email protected]>2012-10-04 16:01:44 -0700
commit089fa91bc51dc10da5a75a6d9fff77f186fccb23 (patch)
tree3bd79d76d353df0b931f9ce2818404b7a2c5a040 /module/zfs/zpl_xattr.c
parent31ab19429787d04d2291851b8178bcee817c15ca (diff)
Align DISCARD requests on zvols.
Currently, when processing DISCARD requests, zvol_discard() calls dmu_free_long_range() with the precise offset and size of the request. Unfortunately, this is not optimal for requests that are not aligned to the zvol block boundaries. Indeed, in the case of an unaligned range, dnode_free_range() will zero out the unaligned parts. Not only is this useless since we are not freeing any space by doing so, it is also slow because it translates to a read-modify-write operation. This patch fixes the issue by rounding up the discard start offset to the next volume block boundary, and rounding down the discard end offset to the previous volume block boundary. Signed-off-by: Brian Behlendorf <[email protected]> Closes #1010
Diffstat (limited to 'module/zfs/zpl_xattr.c')
0 files changed, 0 insertions, 0 deletions