diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-12-16 09:16:41 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-12-16 09:16:41 +0100 |
commit | b568be627a7270eba575bc4406a606e1545f91bb (patch) | |
tree | 1afa91fcd56f9ec77ccf1063d79aa2664675c193 /block | |
parent | 8bea8672edfca7ec5f661cafb218f1205863b343 (diff) | |
download | linux-stable-b568be627a7270eba575bc4406a606e1545f91bb.tar.gz linux-stable-b568be627a7270eba575bc4406a606e1545f91bb.tar.bz2 linux-stable-b568be627a7270eba575bc4406a606e1545f91bb.zip |
block: temporarily disable discard granularity
Commit 86b37281411cf1e9bc0a6b5406c45edb7bd9ea5d adds a check for
misaligned stacking offsets, but it's buggy since the defaults are 0.
Hence all dm devices that pass in a non-zero starting offset will
be marked as misaligned amd dm will complain.
A real fix is coming, in the mean time disable the discard granularity
check so that users don't worry about dm reporting about misaligned
devices.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-settings.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c index dd1f1e0e196f..6ae118d6e193 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -554,11 +554,18 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, ret = -1; } + /* + * Temporarily disable discard granularity. It's currently buggy + * since we default to 0 for discard_granularity, hence this + * "failure" will always trigger for non-zero offsets. + */ +#if 0 if (offset && (offset & (b->discard_granularity - 1)) != b->discard_alignment) { t->discard_misaligned = 1; ret = -1; } +#endif /* If top has no alignment offset, inherit from bottom */ if (!t->alignment_offset) |