At Thu, 23 May 2013 11:38:07 +0800, Liu Yuan wrote: > > On 05/23/2013 11:27 AM, Liu Yuan wrote: > > v4: > > - do_aligned_write before journaling to avoid double journaling > > > > v3: > > - only read first and last sector for write > > - inline flags_direct > > - use & algo for aligned_sector > > - remove constraint for sheepfs > > - refine test > > > > Liu Yuan (5): > > util: add a helper round_down > > plain store: add support to non-aglined read/write > > collie: don't round_up vdi size & read/write > > tests: add a tests/063 to test unaligned read/write/create > > sheepfs: remove the align constraint > > > > collie/vdi.c | 12 +------ > > include/util.h | 3 +- > > sheep/journal.c | 6 ++-- > > sheep/plain_store.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++---- > > sheepfs/volume.c | 5 --- > > tests/062 | 44 +++++++++++++++++++++++ > > tests/062.out | 10 ++++++ > > tests/group | 1 + > > 8 files changed, 154 insertions(+), 27 deletions(-) > > create mode 100755 tests/062 > > create mode 100644 tests/062.out > > > > I'm wondering, if dropping O_DIRECT for unaligned read/write the > simplest and more suitable method? This just sacrifice more memory but > result a much simpler code to maintain. Dropping O_DIRECT looks better to me. If we don't want to use page cache for the object, we can use posix_fadvise(POSIX_FADV_DONTNEED) to drop the cache. Thanks, Kazutaka |