Fix missing mark_page_accessed() for metadata

While testing by

	dd if=/mnt/file of=/dev/null bs=4K

with blktrace, we found tux3 is re-reading 2 metadata blocks.

To fix re-read of metadata, this updates LRU info of accessed metadata
via blockget()/blockread().

With this patch, there is no measurable performance difference
though. This removed re-reading 2 metadata blocks from blktrace.

FIXME: mark_page_accessed() for each blockget()/blockread() would be
overkill. Because data pages calls mark_page_accessed() for each page,
not buffer.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix spell miss of overwrited in comment

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix spell miss of add_defer_oprhan_del()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Add FIXME as big comment to blockget() for future

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Add REQ_META and REQ_PRIO for userland

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Rename [io]table to [io]tree

We are going to use "tree" for B+tree data structure (at least, in
code), and use "table" for data structure represented in internal file.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Rename from "rollup" to "unify"

We change our terminology from "rollup" to "unify".

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

Now, buffer_index_cmp() via list_sort() is top cpu user in backend on
some loads.

So, this optimizes buffer_index_cmp().

Open code bufindex(), then remove unnecessary calculate to compare,
and check page->index and buffer->b_data separately.

The result of this optimizations (measured by fsperf),

dd if=/dev/zero of=/mnt/file bs=4K count=1M conv=fsync

Before:

	4294967296 bytes (4.3 GB) copied, 67.4053 s, 63.7 MB/s

	flush-tux3-8:1 used cpu for 1.696215114 secs

After:

	4294967296 bytes (4.3 GB) copied, 67.0487 s, 64.1 MB/s

	flush-tux3-8:1 used cpu for 1.484304951 secs

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

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix file->f_dentry->d_inode for kernel v3.9

file->f_dentry->d_inode was replaced by file_inode().

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

Unnecessary second argument was removed from hlist_*.

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

MODULE_ALIAS_FS() was introduced.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix missing <linux/aio.h> for kernel v3.10

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

At 3.10, kernel bdi flusher uses the workqueue, instead of own thread
poll manager.

With above change, we have to change our hack to override bdi flusher.

Now, we can override bdi->wb.dwork handler, not bdi->wb.task. And we
don't need to disable task manager anymore, to override bdi
flusher. This means - we can remove BDI_CAP_NO_WRITEBACK hack, now.

But, "bdi_wq" is not exported to module. So, we need new hack - find
address of "bdi_wq" by kallsyms_lookup_name("bdi_wq").

FIXME: Yes. We should remove entirely this hack. Instead, we should
add proper interface to bdi stuff to control FS flush timing.

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