pnfs/blocklayout: Ensure disk address in block device map
authorBenjamin Coddington <bcodding@redhat.com>
Thu, 25 Jan 2018 14:36:26 +0000 (09:36 -0500)
committerTrond Myklebust <trondmy@gmail.com>
Thu, 25 Jan 2018 21:42:35 +0000 (16:42 -0500)
commitf34462c3c8a2ec0f09003b526c4d7c08782d9350
tree9d0c0a8f6f81c464606d40af860d87c8c636765d
parentb39604755ce06389357b0c22d138c954f2e96451
pnfs/blocklayout: Ensure disk address in block device map

It's possible that the device map is smaller than the offset into the device
for the I/O we're adding.  Add a check for it and bail out, otherwise we
risk botching the bio calculations that follow.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trondmy@gmail.com>
fs/nfs/blocklayout/blocklayout.c