summaryrefslogtreecommitdiffstats
path: root/cmd/zdb
diff options
context:
space:
mode:
authorMike Leddy <[email protected]>2013-07-04 01:02:05 -0300
committerBrian Behlendorf <[email protected]>2013-07-09 11:56:43 -0700
commit5d3dc3fb72518a4c191e3a014622b74365eb3a74 (patch)
tree3aec6da604856ffb12cd635d2f3528e6431a483a /cmd/zdb
parentb4f7f105275d996fbcb6abd65760307d2153a89b (diff)
Avoid abort() in vn_rdwr(): libzpool/kernel.c
Make sure that buffer is aligned to 512 bytes on linux so that pread call combined with O_DIRECT does not return EINVAL. Signed-off-by: Brian Behlendorf <[email protected]> Closes #1570
Diffstat (limited to 'cmd/zdb')
-rw-r--r--cmd/zdb/zdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index 936974b5a..a2b6bfe97 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -2844,7 +2844,7 @@ zdb_read_block(char *thing, spa_t *spa)
psize = size;
lsize = size;
- pbuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
+ pbuf = umem_alloc_aligned(SPA_MAXBLOCKSIZE, 512, UMEM_NOFAIL);
lbuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
BP_ZERO(bp);