diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-19 01:33:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-19 01:33:38 -0400 |
commit | 5bab188a316718a26346cdb25c4cc6b319f8f907 (patch) | |
tree | 0316a8294b9709a55b0c5b2f1c1c0d3793d35c01 /include | |
parent | a8c91da549f625d0600d5bd7e1831066b55edf0d (diff) | |
parent | 4d3cf1bc557dc8b88e1cabf1980b3baa3380a641 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
nilfs2: move NILFS_SUPER_MAGIC to linux/magic.h
nilfs2: get rid of nilfs_sb_info structure
nilfs2: use sb instance instead of nilfs_sb_info struct
nilfs2: get rid of sc_sbi back pointer
nilfs2: move log writer onto nilfs object
nilfs2: move next generation counter into nilfs object
nilfs2: move s_inode_lock and s_dirty_files into nilfs object
nilfs2: move parameters on nilfs_sb_info into nilfs object
nilfs2: move mount options to nilfs object
nilfs2: record used amount of each checkpoint in checkpoint list
nilfs2: optimize rec_len functions
nilfs2: append blocksize info to warnings during loading super blocks
nilfs2: add compat ioctl
nilfs2: implement FS_IOC_GETFLAGS/SETFLAGS/GETVERSION
nilfs2: tighten restrictions on inode flags
nilfs2: mark S_NOATIME on inodes only if NOATIME attribute is set
nilfs2: use common file attribute macros
nilfs2: add free entries count only if clear bit operation succeeded
nilfs2: decrement inodes count only if raw inode was successfully deleted
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/magic.h | 1 | ||||
-rw-r--r-- | include/linux/nilfs2_fs.h | 32 |
2 files changed, 10 insertions, 23 deletions
diff --git a/include/linux/magic.h b/include/linux/magic.h index 6cfe344f9559..1e5df2af8d84 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define XENFS_SUPER_MAGIC 0xabba1974 | 23 | #define XENFS_SUPER_MAGIC 0xabba1974 |
24 | #define EXT4_SUPER_MAGIC 0xEF53 | 24 | #define EXT4_SUPER_MAGIC 0xEF53 |
25 | #define BTRFS_SUPER_MAGIC 0x9123683E | 25 | #define BTRFS_SUPER_MAGIC 0x9123683E |
26 | #define NILFS_SUPER_MAGIC 0x3434 | ||
26 | #define HPFS_SUPER_MAGIC 0xf995e849 | 27 | #define HPFS_SUPER_MAGIC 0xf995e849 |
27 | #define ISOFS_SUPER_MAGIC 0x9660 | 28 | #define ISOFS_SUPER_MAGIC 0x9660 |
28 | #define JFFS2_SUPER_MAGIC 0x72b6 | 29 | #define JFFS2_SUPER_MAGIC 0x72b6 |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index 227e49dd5720..8768c469e93e 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
@@ -40,26 +40,7 @@ | |||
40 | 40 | ||
41 | #include <linux/types.h> | 41 | #include <linux/types.h> |
42 | #include <linux/ioctl.h> | 42 | #include <linux/ioctl.h> |
43 | 43 | #include <linux/magic.h> | |
44 | /* | ||
45 | * Inode flags stored in nilfs_inode and on-memory nilfs inode | ||
46 | * | ||
47 | * We define these flags based on ext2-fs because of the | ||
48 | * compatibility reason; to avoid problems in chattr(1) | ||
49 | */ | ||
50 | #define NILFS_SECRM_FL 0x00000001 /* Secure deletion */ | ||
51 | #define NILFS_UNRM_FL 0x00000002 /* Undelete */ | ||
52 | #define NILFS_SYNC_FL 0x00000008 /* Synchronous updates */ | ||
53 | #define NILFS_IMMUTABLE_FL 0x00000010 /* Immutable file */ | ||
54 | #define NILFS_APPEND_FL 0x00000020 /* writes to file may only append */ | ||
55 | #define NILFS_NODUMP_FL 0x00000040 /* do not dump file */ | ||
56 | #define NILFS_NOATIME_FL 0x00000080 /* do not update atime */ | ||
57 | /* Reserved for compression usage... */ | ||
58 | #define NILFS_NOTAIL_FL 0x00008000 /* file tail should not be merged */ | ||
59 | #define NILFS_DIRSYNC_FL 0x00010000 /* dirsync behaviour */ | ||
60 | |||
61 | #define NILFS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | ||
62 | #define NILFS_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ | ||
63 | 44 | ||
64 | 45 | ||
65 | #define NILFS_INODE_BMAP_SIZE 7 | 46 | #define NILFS_INODE_BMAP_SIZE 7 |
@@ -236,8 +217,10 @@ struct nilfs_super_block { | |||
236 | * If there is a bit set in the incompatible feature set that the kernel | 217 | * If there is a bit set in the incompatible feature set that the kernel |
237 | * doesn't know about, it should refuse to mount the filesystem. | 218 | * doesn't know about, it should refuse to mount the filesystem. |
238 | */ | 219 | */ |
220 | #define NILFS_FEATURE_COMPAT_RO_BLOCK_COUNT 0x00000001ULL | ||
221 | |||
239 | #define NILFS_FEATURE_COMPAT_SUPP 0ULL | 222 | #define NILFS_FEATURE_COMPAT_SUPP 0ULL |
240 | #define NILFS_FEATURE_COMPAT_RO_SUPP 0ULL | 223 | #define NILFS_FEATURE_COMPAT_RO_SUPP NILFS_FEATURE_COMPAT_RO_BLOCK_COUNT |
241 | #define NILFS_FEATURE_INCOMPAT_SUPP 0ULL | 224 | #define NILFS_FEATURE_INCOMPAT_SUPP 0ULL |
242 | 225 | ||
243 | /* | 226 | /* |
@@ -260,7 +243,6 @@ struct nilfs_super_block { | |||
260 | #define NILFS_USER_INO 11 /* Fisrt user's file inode number */ | 243 | #define NILFS_USER_INO 11 /* Fisrt user's file inode number */ |
261 | 244 | ||
262 | #define NILFS_SB_OFFSET_BYTES 1024 /* byte offset of nilfs superblock */ | 245 | #define NILFS_SB_OFFSET_BYTES 1024 /* byte offset of nilfs superblock */ |
263 | #define NILFS_SUPER_MAGIC 0x3434 /* NILFS filesystem magic number */ | ||
264 | 246 | ||
265 | #define NILFS_SEG_MIN_BLOCKS 16 /* Minimum number of blocks in | 247 | #define NILFS_SEG_MIN_BLOCKS 16 /* Minimum number of blocks in |
266 | a full segment */ | 248 | a full segment */ |
@@ -346,17 +328,21 @@ static inline unsigned nilfs_rec_len_from_disk(__le16 dlen) | |||
346 | { | 328 | { |
347 | unsigned len = le16_to_cpu(dlen); | 329 | unsigned len = le16_to_cpu(dlen); |
348 | 330 | ||
331 | #if !defined(__KERNEL__) || (PAGE_CACHE_SIZE >= 65536) | ||
349 | if (len == NILFS_MAX_REC_LEN) | 332 | if (len == NILFS_MAX_REC_LEN) |
350 | return 1 << 16; | 333 | return 1 << 16; |
334 | #endif | ||
351 | return len; | 335 | return len; |
352 | } | 336 | } |
353 | 337 | ||
354 | static inline __le16 nilfs_rec_len_to_disk(unsigned len) | 338 | static inline __le16 nilfs_rec_len_to_disk(unsigned len) |
355 | { | 339 | { |
340 | #if !defined(__KERNEL__) || (PAGE_CACHE_SIZE >= 65536) | ||
356 | if (len == (1 << 16)) | 341 | if (len == (1 << 16)) |
357 | return cpu_to_le16(NILFS_MAX_REC_LEN); | 342 | return cpu_to_le16(NILFS_MAX_REC_LEN); |
358 | else if (len > (1 << 16)) | 343 | else if (len > (1 << 16)) |
359 | BUG(); | 344 | BUG(); |
345 | #endif | ||
360 | return cpu_to_le16(len); | 346 | return cpu_to_le16(len); |
361 | } | 347 | } |
362 | 348 | ||
@@ -525,7 +511,7 @@ struct nilfs_checkpoint { | |||
525 | __le64 cp_create; | 511 | __le64 cp_create; |
526 | __le64 cp_nblk_inc; | 512 | __le64 cp_nblk_inc; |
527 | __le64 cp_inodes_count; | 513 | __le64 cp_inodes_count; |
528 | __le64 cp_blocks_count; /* Reserved (might be deleted) */ | 514 | __le64 cp_blocks_count; |
529 | 515 | ||
530 | /* Do not change the byte offset of ifile inode. | 516 | /* Do not change the byte offset of ifile inode. |
531 | To keep the compatibility of the disk format, | 517 | To keep the compatibility of the disk format, |