Call blkdiscard iff it exists

Since dm-writeboost works correctly without calling blkdiscard,
call it iff it exist for suppressing the unnecessary error message.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Check if whether some scripts run under root privilege or not

Since some scripts requires root privilege, check if it before
running them and display proper warning message if needed.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Unify kernel module loading routine

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
cleanup-cache.sh: Add parameter check

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Merge pull request #48 from satoru-takeuchi/sat-add-error-check-v2

Sat add error check v2
add sorted migration (not complete)

Signed-off-by: Akira Hayakawa <hayakawa@valinux.co.jp>
implement-ed sorted writeback (but buggy)

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
fix: sorted writeback

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
add static to compare_migrate_io()

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
Merge branch 'feature/sorted-writeback' into develop
test: change to ruby 2.1.1

KNOWNBUGS disappeared

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
change the default values

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
FIX: mb->sector should be 4KB aliged. calc_cache_alignment() needs in
rebuild_rambuf()

- without this patch, ruby compile test in dmts doesn't work for type 1

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
mb_idx_inseg returns u8 not u32

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
space fix in rebuild_rambuf(): 1  + xx -> 1 + xx

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
add (u64) explicit cast to the argument of cpu_to_le64(sector)

- dm-crypt does like this.

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
the comment of init_devices is not the order of in-code

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
switch left-right: fix value in the context should be right-hand

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
remove WQ_NON_REENTRANT flag

lastest wq is all reentrant. there is no need to explicitly flag it.
the flag is almost deprecated (will be deleted?)

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
rename: plog_buf -> plog_seg_buf

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>