[sheepdog] [PATCH] plain store: remove unnecessary check
Liu Yuan
namei.unix at gmail.com
Thu May 23 14:30:51 CEST 2013
Even for inode object, we can use O_DIRECT if request is aligned.
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
sheep/plain_store.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sheep/plain_store.c b/sheep/plain_store.c
index 9fb9ad1..781b777 100644
--- a/sheep/plain_store.c
+++ b/sheep/plain_store.c
@@ -34,8 +34,7 @@ static int prepare_iocb(uint64_t oid, const struct siocb *iocb, bool create)
if (uatomic_is_true(&sys->use_journal) || sys->nosync == true)
flags &= ~O_DSYNC;
- /* We can not use DIO for inode object because it is not 512B aligned */
- if (sys->backend_dio && is_data_obj(oid) && iocb_is_aligned(iocb)) {
+ if (sys->backend_dio && iocb_is_aligned(iocb)) {
assert(is_aligned_to_pagesize(iocb->buf));
flags |= O_DIRECT;
}
--
1.7.9.5
More information about the sheepdog
mailing list