summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-thin.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2014-10-09 19:32:22 -0400
committerMike Snitzer <snitzer@redhat.com>2014-11-10 15:25:27 -0500
commit148e51baf8e7ae2070ec47c2a0ec05ddf6a47da1 (patch)
treebf734d271d8f30aa41a4fd9439133f4398ff6d44 /drivers/md/dm-thin.c
parent604ea90641b45f41f8dee34ce45694f1e0c53a5a (diff)
downloadop-kernel-dev-148e51baf8e7ae2070ec47c2a0ec05ddf6a47da1.zip
op-kernel-dev-148e51baf8e7ae2070ec47c2a0ec05ddf6a47da1.tar.gz
dm: improve documentation and code clarity in dm_merge_bvec
These code changes do not introduce a functional change. But bio_add_page() will never attempt to build up a bio larger than queue_max_sectors(). Similarly, bio_get_nr_vecs() is also bound by queue_max_sectors(). Therefore, there is no point in allowing dm_merge_bvec() to answer "how many sectors can a bio have at this offset?" with anything larger than queue_max_sectors(). Using queue_max_sectors() rather than BIO_MAX_SECTORS serves to more accurately convey the limits that are being imposed. Also, use unlikely() to clarify the fact that the defensive code in dm_merge_bvec() relative to max_size going negative shouldn't ever happen -- if it does happen there is a bug in the block layer for requesting larger than dm_merge_bvec()'s initial response for a given offset. Also, update a comment in dm_merge_bvec() relative to max_hw_sectors_kb. And fix empty newline whitespace. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-thin.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud