Whamcloud - gitweb
Merge branch 'maint' into next
authorTheodore Ts'o <tytso@mit.edu>
Mon, 10 Sep 2012 02:52:26 +0000 (22:52 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 10 Sep 2012 02:52:26 +0000 (22:52 -0400)
Conflicts:
lib/ext2fs/ext2fs.h

1  2 
configure
configure.in
e2fsck/jfs_user.h
lib/ext2fs/Makefile.in
lib/ext2fs/ext2fs.h
lib/ext2fs/initialize.c
lib/ext2fs/kernel-jbd.h
lib/ext2fs/tst_super_size.c

diff --cc configure
Simple merge
diff --cc configure.in
Simple merge
Simple merge
Simple merge
@@@ -1504,10 -1439,8 +1514,9 @@@ extern errcode_t ext2fs_write_bb_FILE(e
  
  
  /* inline functions */
+ #ifdef NO_INLINE_FUNCS
 +extern void ext2fs_init_csum_seed(ext2_filsys fs);
  extern errcode_t ext2fs_get_mem(unsigned long size, void *ptr);
- extern errcode_t ext2fs_get_memalign(unsigned long size,
-                                    unsigned long align, void *ptr);
  extern errcode_t ext2fs_get_memzero(unsigned long size, void *ptr);
  extern errcode_t ext2fs_get_array(unsigned long count,
                                  unsigned long size, void *ptr);
@@@ -1552,19 -1486,10 +1562,20 @@@ extern __u64 ext2fs_div64_ceil(__u64 a
  #define _INLINE_ extern __inline__
  #else                         /* For Watcom C */
  #define _INLINE_ extern inline
- #endif
+ #endif /* __GNUC__ */
+ #endif /* __STDC_VERSION__ >= 199901L */
  #endif
  
 +_INLINE_ void ext2fs_init_csum_seed(ext2_filsys fs)
 +{
 +      if (!EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
 +                                      EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))
 +              return;
 +
 +      fs->csum_seed = ext2fs_crc32c_le(~0, fs->super->s_uuid,
 +                                       sizeof(fs->super->s_uuid));
 +}
 +
  #ifndef EXT2_CUSTOM_MEMORY_ROUTINES
  #include <string.h>
  /*
Simple merge
@@@ -259,38 -235,7 +259,46 @@@ typedef struct journal_superblock_
  #define JFS_KNOWN_ROCOMPAT_FEATURES   0
  #define JFS_KNOWN_INCOMPAT_FEATURES   (JFS_FEATURE_INCOMPAT_REVOKE|\
                                         JFS_FEATURE_INCOMPAT_ASYNC_COMMIT|\
 -                                       JFS_FEATURE_INCOMPAT_64BIT)
 +                                       JFS_FEATURE_INCOMPAT_64BIT|\
 +                                       JFS_FEATURE_INCOMPAT_CSUM_V2)
 +
 +#if (defined(E2FSCK_INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS))
 +#ifdef E2FSCK_INCLUDE_INLINE_FUNCS
- #define _INLINE_ extern
++#if (__STDC_VERSION__ >= 199901L)
++#define _INLINE_ extern inline
 +#else
++#define _INLINE_ inline
++#endif
++#else /* !E2FSCK_INCLUDE_INLINE FUNCS */
++#if (__STDC_VERSION__ >= 199901L)
++#define _INLINE_ inline
++#else /* not C99 */
 +#ifdef __GNUC__
 +#define _INLINE_ extern __inline__
 +#else                         /* For Watcom C */
 +#define _INLINE_ extern inline
- #endif
- #endif
++#endif /* __GNUC__ */
++#endif /* __STDC_VERSION__ >= 199901L */
++#endif /* INCLUDE_INLINE_FUNCS */
 +
 +/*
 + * helper functions to deal with 32 or 64bit block numbers.
 + */
 +_INLINE_ size_t journal_tag_bytes(journal_t *journal)
 +{
 +      journal_block_tag_t tag;
 +      size_t x = 0;
 +
 +      if (JFS_HAS_INCOMPAT_FEATURE(journal, JFS_FEATURE_INCOMPAT_CSUM_V2))
 +              x += sizeof(tag.t_checksum);
 +
 +      if (JFS_HAS_INCOMPAT_FEATURE(journal, JFS_FEATURE_INCOMPAT_64BIT))
 +              return x + JBD_TAG_SIZE64;
 +      else
 +              return x + JBD_TAG_SIZE32;
 +}
 +#undef _INLINE_
 +#endif
  
  #ifdef __KERNEL__
  
Simple merge