Fix overflow case on truncate path

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix tux3_file_splice_write() for kernel v3.10

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix tux3_invalidatepage() for kernel v3.11

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix tux_readdir() for kernel v3.11

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Add dir_relax() to tux_readdir() for kernel v3.11

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Update userland to convert readdir() to interate()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix newpage_add_lru() for kernel v3.11

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Add optional handlers in kernel v3.11

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix flusher for kernel v3.11

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix truncate_pagecache() for kernel v3.12

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Update tux3_file_aio_write() for kernel v3.12

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Update __tux3_test_set_page_writeback() for kernel v3.12

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Update clone_page() for kernel kernel v3.13

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Update struct wb_writeback_work for kernel v3.13

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix sync_current_delta() for kernel v3.13

sync_inodes_sb() interface was changed.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix __tux3_set_page_dirty() for kernel v3.14

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Drop codes for older than kernel v3.12

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix tux3_truncate_inode_pages_range() overflow handling

At 3.11, truncate_inode_pages_range() was changed to support partial
page range. But it doesn't handle corner cases correctly.

loff_t is signed, so loff_t >> shift_bits is invalid operation.
So, we have to care loff_t doesn't overflow signed.

This assumes loff_t >> PAGE_CACHE_SHIFT doesn't overflow pgoff_t (this
is true if loff_t < MAX_LFS_FILESIZE).

With this assumption, this fix overflow cases by just casting to (u64).

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Add shadow file infrastructure to tux3_fsck.c

For now, we need shadow file for bitmap and countmap.  So this makes
bitmap shadow file reusable for countmap.

With this change, we can add shadow file for countmap easily, and
share codes for it.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Support countmap fsck

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>