linux_dsm_epyc7002/fs/nilfs2
Ryusuke Konishi 003ff182fd nilfs2: allow future expansion of metadata read out via get info ioctl
Nilfs has some ioctl commands to read out metadata from meta data
files:

 - NILFS_IOCTL_GET_CPINFO for checkpoint file,
 - NILFS_IOCTL_GET_SUINFO for segment usage file, and
 - NILFS_IOCTL_GET_VINFO for Disk Address Transalation (DAT) file,
   respectively.

Every routine on these metadata files is implemented so that it allows
future expansion of on-disk format.  But, the above ioctl commands do
not support expansion even though nilfs_argv structure can handle
arbitrary size for data exchanged via ioctl.

This allows future expansion of the following structures which give
basic format of the "get information" ioctls:

 - struct nilfs_cpinfo
 - struct nilfs_suinfo
 - struct nilfs_vinfo

So, this introduces forward compatility of such ioctl commands.

In this patch, a sanity check in nilfs_ioctl_get_info() function is
changed to accept larger data structure [1], and metadata read
routines are rewritten so that they become compatible for larger
structures; the routines will just ignore the remaining fields which
the current version of nilfs doesn't know.

[1] The ioctl function already has another upper limit (PAGE_SIZE
    against a structure, which appears in nilfs_ioctl_wrap_copy
    function), and this will not cause security problem.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
2009-06-10 23:41:11 +09:00
..
alloc.c nilfs2: persistent object allocator 2009-04-07 08:31:13 -07:00
alloc.h nilfs2: persistent object allocator 2009-04-07 08:31:13 -07:00
bmap_union.h nilfs2: integrated block mapping 2009-04-07 08:31:13 -07:00
bmap.c nilfs2: remove bmap pointer operations 2009-06-10 23:41:10 +09:00
bmap.h nilfs2: remove bmap pointer operations 2009-06-10 23:41:10 +09:00
btnode.c nilfs2: B-tree node cache 2009-04-07 08:31:13 -07:00
btnode.h nilfs2: B-tree node cache 2009-04-07 08:31:13 -07:00
btree.c nilfs2: remove nilfs_btree_operations from btree mapping 2009-06-10 23:41:11 +09:00
btree.h nilfs2: remove nilfs_btree_operations from btree mapping 2009-06-10 23:41:11 +09:00
cpfile.c nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
cpfile.h nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
dat.c nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
dat.h nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
dir.c nilfs2: use unlocked_ioctl 2009-04-07 08:31:19 -07:00
direct.c nilfs2: remove nilfs_direct_operations from direct mapping 2009-06-10 23:41:11 +09:00
direct.h nilfs2: remove nilfs_direct_operations from direct mapping 2009-06-10 23:41:11 +09:00
file.c nilfs2: use unlocked_ioctl 2009-04-07 08:31:19 -07:00
gcdat.c nilfs2: another dat for garbage collection 2009-04-07 08:31:16 -07:00
gcinode.c nilfs2: support nanosecond timestamp 2009-04-07 08:31:20 -07:00
ifile.c nilfs2: inode map file 2009-04-07 08:31:14 -07:00
ifile.h nilfs2: inode map file 2009-04-07 08:31:14 -07:00
inode.c NILFS2: Pagecache usage optimization on NILFS2 2009-06-10 23:41:11 +09:00
ioctl.c nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
Makefile nilfs2: update makefile and Kconfig 2009-04-07 08:31:16 -07:00
mdt.c nilfs2: ensure to clear dirty state when deleting metadata file block 2009-05-10 17:04:42 +09:00
mdt.h nilfs2: meta data file 2009-04-07 08:31:13 -07:00
namei.c nilfs2: avoid double error caused by nilfs_transaction_end 2009-04-07 08:31:17 -07:00
nilfs.h nilfs2: fix lock order reversal in nilfs_clean_segments ioctl 2009-05-11 14:54:41 +09:00
page.c nilfs2: ensure to clear dirty state when deleting metadata file block 2009-05-10 17:04:42 +09:00
page.h nilfs2: buffer and page operations 2009-04-07 08:31:13 -07:00
recovery.c nilfs2: remove header file for segment list operations 2009-06-10 23:41:09 +09:00
sb.h nilfs2: add inode and other major structures 2009-04-07 08:31:12 -07:00
segbuf.c nilfs2: eliminate removal list of segments 2009-06-10 23:41:09 +09:00
segbuf.h nilfs2: simplify handling of active state of segments 2009-04-07 08:31:20 -07:00
segment.c nilfs2: eliminate removal list of segments 2009-06-10 23:41:09 +09:00
segment.h nilfs2: remove header file for segment list operations 2009-06-10 23:41:09 +09:00
sufile.c nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
sufile.h nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
super.c nilfs2: remove module version 2009-04-13 09:53:50 +09:00
the_nilfs.c nilfs2: remove header file for segment list operations 2009-06-10 23:41:09 +09:00
the_nilfs.h nilfs2: introduce secondary super block 2009-04-07 08:31:20 -07:00