mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
nilfs2: move ioctl interface and disk layout to uapi separately
The header file "include/linux/nilfs2_fs.h" is composed of parts for ioctl and disk format, and both are intended to be shared with user space programs. This moves them to the uapi directory "include/uapi/linux" splitting the file to "nilfs2_api.h" and "nilfs2_ondisk.h". The following minor changes are accompanied by this migration: - nilfs_direct_node struct in nilfs2/direct.h is converged to nilfs2_ondisk.h because it's an on-disk structure. - inline functions nilfs_rec_len_from_disk() and nilfs_rec_len_to_disk() are moved to nilfs2/dir.c. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ryusuke Konishi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4ce5c3426c
commit
e63e88bc53
18 changed files with 348 additions and 329 deletions
|
|
@ -22,7 +22,7 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/nilfs2_fs.h>
|
||||
#include <linux/nilfs2_ondisk.h> /* nilfs_binfo, nilfs_inode, etc */
|
||||
#include "alloc.h"
|
||||
#include "dat.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/nilfs2_fs.h>
|
||||
#include <linux/nilfs2_ondisk.h> /* nilfs_btree_node */
|
||||
#include "btnode.h"
|
||||
#include "bmap.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/nilfs2_fs.h>
|
||||
#include "mdt.h"
|
||||
#include "cpfile.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
|
||||
#include <linux/fs.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/nilfs2_fs.h>
|
||||
#include <linux/nilfs2_api.h> /* nilfs_cpstat */
|
||||
#include <linux/nilfs2_ondisk.h> /* nilfs_inode, nilfs_checkpoint */
|
||||
|
||||
|
||||
int nilfs_cpfile_get_checkpoint(struct inode *, __u64, int,
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/nilfs2_ondisk.h> /* nilfs_inode, nilfs_checkpoint */
|
||||
|
||||
|
||||
struct nilfs_palloc_req;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,28 @@
|
|||
#include "nilfs.h"
|
||||
#include "page.h"
|
||||
|
||||
static inline unsigned int nilfs_rec_len_from_disk(__le16 dlen)
|
||||
{
|
||||
unsigned int len = le16_to_cpu(dlen);
|
||||
|
||||
#if (PAGE_SIZE >= 65536)
|
||||
if (len == NILFS_MAX_REC_LEN)
|
||||
return 1 << 16;
|
||||
#endif
|
||||
return len;
|
||||
}
|
||||
|
||||
static inline __le16 nilfs_rec_len_to_disk(unsigned int len)
|
||||
{
|
||||
#if (PAGE_SIZE >= 65536)
|
||||
if (len == (1 << 16))
|
||||
return cpu_to_le16(NILFS_MAX_REC_LEN);
|
||||
|
||||
BUG_ON(len > (1 << 16));
|
||||
#endif
|
||||
return cpu_to_le16(len);
|
||||
}
|
||||
|
||||
/*
|
||||
* nilfs uses block-sized chunks. Arguably, sector-sized ones would be
|
||||
* more robust, but we have what we have
|
||||
|
|
|
|||
|
|
@ -24,16 +24,6 @@
|
|||
#include "bmap.h"
|
||||
|
||||
|
||||
/**
|
||||
* struct nilfs_direct_node - direct node
|
||||
* @dn_flags: flags
|
||||
* @dn_pad: padding
|
||||
*/
|
||||
struct nilfs_direct_node {
|
||||
__u8 dn_flags;
|
||||
__u8 pad[7];
|
||||
};
|
||||
|
||||
#define NILFS_DIRECT_NBLOCKS (NILFS_BMAP_SIZE / sizeof(__le64) - 1)
|
||||
#define NILFS_DIRECT_KEY_MIN 0
|
||||
#define NILFS_DIRECT_KEY_MAX (NILFS_DIRECT_NBLOCKS - 1)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include <linux/fs.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/nilfs2_fs.h>
|
||||
#include "mdt.h"
|
||||
#include "alloc.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include <linux/compat.h> /* compat_ptr() */
|
||||
#include <linux/mount.h> /* mnt_want_write_file(), mnt_drop_write_file() */
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/nilfs2_fs.h>
|
||||
#include "nilfs.h"
|
||||
#include "segment.h"
|
||||
#include "bmap.h"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
#include <linux/buffer_head.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/nilfs2_fs.h>
|
||||
#include <linux/nilfs2_api.h>
|
||||
#include <linux/nilfs2_ondisk.h>
|
||||
#include "the_nilfs.h"
|
||||
#include "bmap.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#include <linux/fs.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/nilfs2_fs.h>
|
||||
#include "nilfs.h"
|
||||
|
||||
struct nilfs_root;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/nilfs2_fs.h>
|
||||
#include "mdt.h"
|
||||
#include "sufile.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include <linux/fs.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/nilfs2_fs.h>
|
||||
#include "mdt.h"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue