remarkable-linux/fs/ocfs2
Tristan Ye ddee5cdb70 Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v8.
The reason why we need this ioctl is to offer the none-privileged
end-user a possibility to get filesys info gathering.

We use OCFS2_IOC_INFO to manipulate the new ioctl, userspace passes a
structure to kernel containing an array of request pointers and request
count, such as,

* From userspace:

struct ocfs2_info_blocksize oib = {
        .ib_req = {
                .ir_magic = OCFS2_INFO_MAGIC,
                .ir_code = OCFS2_INFO_BLOCKSIZE,
                ...
        }
        ...
}

struct ocfs2_info_clustersize oic = {
        ...
}

uint64_t reqs[2] = {(unsigned long)&oib,
                    (unsigned long)&oic};

struct ocfs2_info info = {
        .oi_requests = reqs,
        .oi_count = 2,
}

ret = ioctl(fd, OCFS2_IOC_INFO, &info);

* In kernel:

Get the request pointers from *info*, then handle each request one bye one.

Idea here is to make the spearated request small enough to guarantee
a better backward&forward compatibility since a small piece of request
would be less likely to be broken if filesys on raw disk get changed.

Currently, the following 7 requests are supported per the requirement from
userspace tool o2info, and I believe it will grow over time:-)

        OCFS2_INFO_CLUSTERSIZE
        OCFS2_INFO_BLOCKSIZE
        OCFS2_INFO_MAXSLOTS
        OCFS2_INFO_LABEL
        OCFS2_INFO_UUID
        OCFS2_INFO_FS_FEATURES
        OCFS2_INFO_JOURNAL_SIZE

This ioctl is only specific to OCFS2.

Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
2010-09-10 08:35:41 -07:00
..
cluster O2net: Disallow o2net accept connection request from itself. 2010-08-07 10:50:33 -07:00
dlm Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 2010-08-13 10:43:50 -07:00
dlmfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-08-10 11:26:52 -07:00
acl.c Fix the nested PR lock calling issue in ACL 2010-08-07 10:46:46 -07:00
acl.h
alloc.c ocfs2: Fix deadlock when allocating page 2010-09-08 14:25:57 +08:00
alloc.h Merge branch 'discontig-bg' of git://oss.oracle.com/git/tma/linux-2.6 into ocfs2-merge-window 2010-05-18 16:40:42 -07:00
aops.c sort out blockdev_direct_IO variants 2010-08-09 16:47:29 -04:00
aops.h
blockcheck.c ocfs2: Fix metaecc error messages 2010-09-08 14:25:53 +08:00
blockcheck.h
buffer_head_io.c Merge branch 'skip_delete_inode' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2-mark into ocfs2-fixes 2010-04-30 13:37:29 -07:00
buffer_head_io.h
dcache.c
dcache.h
dir.c Merge branch 'discontig-bg' of git://oss.oracle.com/git/tma/linux-2.6 into ocfs2-merge-window 2010-05-18 16:40:42 -07:00
dir.h
dlmglue.c fs/ocfs2: Remove unnecessary casts of private_data 2010-07-20 17:20:08 +02:00
dlmglue.h
export.c
export.h
extent_map.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
extent_map.h
file.c Ocfs2: Fix a regression bug from mainline commit(6b933c8e6f). 2010-09-08 14:25:57 +08:00
file.h ocfs2: Zero the tail cluster when extending past i_size. 2010-07-08 13:25:35 -07:00
heartbeat.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
heartbeat.h
inode.c ocfs2: Fix incorrect checksum validation error 2010-09-08 14:25:54 +08:00
inode.h Make ->drop_inode() just return whether inode needs to be dropped 2010-08-09 16:48:35 -04:00
ioctl.c Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v8. 2010-09-10 08:35:41 -07:00
ioctl.h Ocfs2: Move ocfs2 ioctl definitions from ocfs2_fs.h to newly added ocfs2_ioctl.h 2010-03-02 14:10:20 -08:00
journal.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 2010-08-07 13:03:53 -07:00
journal.h ocfs2: Make ocfs2_journal_dirty() void. 2010-05-05 18:17:29 -07:00
Kconfig
localalloc.c ocfs2: Limit default local alloc size within bitmap range. 2010-06-15 16:50:43 -07:00
localalloc.h ocfs2: increase the default size of local alloc windows 2010-05-05 18:18:07 -07:00
locks.c [PATCH] Skip check for mandatory locks when unlocking 2010-03-17 12:07:16 -07:00
locks.h
Makefile ocfs2: allocation reservations 2010-05-05 18:17:30 -07:00
mmap.c ocfs2: make __ocfs2_page_mkwrite handle file end properly. 2010-09-08 14:25:55 +08:00
mmap.h
namei.c ocfs2: Fix orphan add in ocfs2_create_inode_in_orphan 2010-09-08 14:26:00 +08:00
namei.h
ocfs1_fs_compat.h
ocfs2.h ocfs2: Add dir_resv_level mount option 2010-05-05 18:18:07 -07:00
ocfs2_fs.h ocfs2: increase the default size of local alloc windows 2010-05-05 18:18:07 -07:00
ocfs2_ioctl.h Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v8. 2010-09-10 08:35:41 -07:00
ocfs2_lockid.h
ocfs2_lockingver.h ocfs2_dlmfs: Enable the use of user cluster stacks. 2010-02-26 15:41:18 -08:00
quota.h ocfs2: Fix NULL pointer deref when writing local dquot 2010-05-21 19:30:48 +02:00
quota_global.c ocfs2: Zero the tail cluster when extending past i_size. 2010-07-08 13:25:35 -07:00
quota_local.c ocfs2: Zero the tail cluster when extending past i_size. 2010-07-08 13:25:35 -07:00
refcounttree.c ocfs2: Fix deadlock when allocating page 2010-09-08 14:25:57 +08:00
refcounttree.h Ocfs2: Optimize ocfs2 truncate to use ocfs2_remove_btree_range() instead. 2010-05-18 12:25:10 -07:00
reservations.c ocfs2: update gfp/slab.h includes 2010-06-28 10:19:19 +10:00
reservations.h ocfs2: make ocfs2_adjust_resv_from_alloc simple. 2010-05-05 18:18:09 -07:00
resize.c ocfs2: Make ocfs2_journal_dirty() void. 2010-05-05 18:17:29 -07:00
resize.h
slot_map.c
slot_map.h
stack_o2cb.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
stack_user.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
stackglue.c ocfs2_dlmfs: Enable the use of user cluster stacks. 2010-02-26 15:41:18 -08:00
stackglue.h ocfs2_dlmfs: Enable the use of user cluster stacks. 2010-02-26 15:41:18 -08:00
suballoc.c ocfs2: allow return of new inode block location before allocation of the inode 2010-09-08 14:25:59 +08:00
suballoc.h ocfs2: allow return of new inode block location before allocation of the inode 2010-09-08 14:25:59 +08:00
super.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-08-10 11:26:52 -07:00
super.h ocfs2: Wrap signal blocking in void functions. 2010-05-10 11:50:10 -07:00
symlink.c
symlink.h
sysfile.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sysfile.h
uptodate.c
uptodate.h
ver.c
ver.h
xattr.c ocfs2: Make xattr reflink work with new local alloc reservation. 2010-07-12 13:57:50 -07:00
xattr.h ocfs: constify xattr_handler 2010-05-21 18:31:20 -04:00