Whamcloud - gitweb
Branch HEAD
authorscjody <scjody>
Sat, 31 Mar 2007 00:20:55 +0000 (00:20 +0000)
committerscjody <scjody>
Sat, 31 Mar 2007 00:20:55 +0000 (00:20 +0000)
Add new ldiskfs2 module based on ldiskfs.

b=11981
r=adilger
r=nathan

16 files changed:
lustre/Makefile.in
lustre/autoMakefile.am
lustre/autoconf/lustre-core.m4
lustre/kernel_patches/series/ldiskfs2-2.6-fc3.series [new file with mode: 0644]
lustre/kernel_patches/series/ldiskfs2-2.6-fc5.series [new file with mode: 0644]
lustre/kernel_patches/series/ldiskfs2-2.6-rhel4.series [new file with mode: 0644]
lustre/kernel_patches/series/ldiskfs2-2.6-sles10.series [new file with mode: 0644]
lustre/kernel_patches/series/ldiskfs2-2.6-suse.series [new file with mode: 0644]
lustre/kernel_patches/series/ldiskfs2-2.6.12-vanilla.series [new file with mode: 0644]
lustre/kernel_patches/series/ldiskfs2-2.6.18-vanilla.series [new file with mode: 0644]
lustre/ldiskfs2/.cvsignore [new file with mode: 0644]
lustre/ldiskfs2/Makefile.in [new file with mode: 0644]
lustre/ldiskfs2/autoMakefile.am [new file with mode: 0644]
lustre/lvfs/.cvsignore
lustre/lvfs/Makefile.in
lustre/lvfs/autoMakefile.am

index 1b7a9be..cca2b21 100644 (file)
@@ -1,4 +1,4 @@
-@LDISKFS_TRUE@subdir-m += ldiskfs
+@LDISKFS_TRUE@subdir-m += ldiskfs ldiskfs2
 
 subdir-m += lvfs
 subdir-m += obdclass
 
 subdir-m += lvfs
 subdir-m += obdclass
index f0531e8..b2097ea 100644 (file)
@@ -9,7 +9,7 @@ AUTOMAKE_OPTIONS = foreign
 ALWAYS_SUBDIRS := include lvfs obdclass ldlm ptlrpc osc lov obdecho \
        mgc doc utils tests scripts autoconf contrib
 
 ALWAYS_SUBDIRS := include lvfs obdclass ldlm ptlrpc osc lov obdecho \
        mgc doc utils tests scripts autoconf contrib
 
-SERVER_SUBDIRS := ldiskfs obdfilter ost mds mgs
+SERVER_SUBDIRS := ldiskfs ldiskfs2 obdfilter ost mds mgs
 
 CLIENT_SUBDIRS := mdc llite
 
 
 CLIENT_SUBDIRS := mdc llite
 
@@ -45,9 +45,11 @@ DIST_SUBDIRS := $(ALWAYS_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS)        \
 EXTRA_DIST = BUGS FDL kernel_patches
 
 if LDISKFS
 EXTRA_DIST = BUGS FDL kernel_patches
 
 if LDISKFS
-LDISKFS = ldiskfs-sources
+LDISKFS = ldiskfs-sources ldiskfs2-sources
 ldiskfs-sources:
        $(MAKE) sources -C ldiskfs
 ldiskfs-sources:
        $(MAKE) sources -C ldiskfs
+ldiskfs2-sources:
+       $(MAKE) sources -C ldiskfs2
 endif
 
 lvfs-sources:
 endif
 
 lvfs-sources:
index f9ee3a8..20e788f 100644 (file)
@@ -340,8 +340,12 @@ if test x$enable_ldiskfs = xyes ; then
 
        AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module])
        AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs])
 
        AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module])
        AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs])
-       AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls])
-       AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security])
+       AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls for ldiskfs])
+       AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security for ldiskfs])
+
+       AC_DEFINE(CONFIG_LDISKFS2_FS_XATTR, 1, [enable extended attributes for ldiskfs2])
+       AC_DEFINE(CONFIG_LDISKFS2_FS_POSIX_ACL, 1, [enable posix acls for ldiskfs2])
+       AC_DEFINE(CONFIG_LDISKFS2_FS_SECURITY, 1, [enable fs security for ldiskfs2])
 fi
 
 AC_MSG_CHECKING([which backing filesystem to use])
 fi
 
 AC_MSG_CHECKING([which backing filesystem to use])
@@ -1297,6 +1301,8 @@ lustre/kernel_patches/targets/suse-2.4.21-2.target
 lustre/kernel_patches/targets/sles-2.4.target
 lustre/ldiskfs/Makefile
 lustre/ldiskfs/autoMakefile
 lustre/kernel_patches/targets/sles-2.4.target
 lustre/ldiskfs/Makefile
 lustre/ldiskfs/autoMakefile
+lustre/ldiskfs2/Makefile
+lustre/ldiskfs2/autoMakefile
 lustre/ldlm/Makefile
 lustre/liblustre/Makefile
 lustre/liblustre/tests/Makefile
 lustre/ldlm/Makefile
 lustre/liblustre/Makefile
 lustre/liblustre/tests/Makefile
diff --git a/lustre/kernel_patches/series/ldiskfs2-2.6-fc3.series b/lustre/kernel_patches/series/ldiskfs2-2.6-fc3.series
new file mode 100644 (file)
index 0000000..3661023
--- /dev/null
@@ -0,0 +1,13 @@
+ext3-wantedi-2.6-rhel4.patch
+ext3-san-jdike-2.6-suse.patch
+iopen-2.6-rhel4.patch 
+export_symbols-ext3-2.6-suse.patch
+ext3-map_inode_page-2.6-suse.patch
+ext3-ea-in-inode-2.6-rhel4.patch
+export-ext3-2.6-rhel4.patch
+ext3-include-fixes-2.6-rhel4.patch
+ext3-extents-2.6.9-rhel4.patch
+ext3-mballoc2-2.6.9-rhel4.patch 
+ext3-nlinks-2.6.9.patch
+ext3-ialloc-2.6.patch
+ext3-lookup-dotdot-2.6.9.patch
diff --git a/lustre/kernel_patches/series/ldiskfs2-2.6-fc5.series b/lustre/kernel_patches/series/ldiskfs2-2.6-fc5.series
new file mode 100644 (file)
index 0000000..1c853bd
--- /dev/null
@@ -0,0 +1,12 @@
+ext3-wantedi-2.6-rhel4.patch
+ext3-san-jdike-2.6-suse.patch
+iopen-2.6-fc5.patch
+ext3-map_inode_page-2.6-suse.patch
+export-ext3-2.6-rhel4.patch
+ext3-include-fixes-2.6-rhel4.patch
+ext3-extents-2.6.15.patch
+ext3-mballoc2-2.6-fc5.patch
+ext3-nlinks-2.6.9.patch
+ext3-ialloc-2.6.patch
+ext3-remove-cond_resched-calls-2.6.12.patch
+ext3-filterdata-2.6.15.patch
diff --git a/lustre/kernel_patches/series/ldiskfs2-2.6-rhel4.series b/lustre/kernel_patches/series/ldiskfs2-2.6-rhel4.series
new file mode 100644 (file)
index 0000000..7829040
--- /dev/null
@@ -0,0 +1,15 @@
+ext3-wantedi-2.6-rhel4.patch
+ext3-san-jdike-2.6-suse.patch
+iopen-2.6-rhel4.patch 
+export_symbols-ext3-2.6-suse.patch
+ext3-map_inode_page-2.6-suse.patch
+ext3-ea-in-inode-2.6-rhel4.patch
+export-ext3-2.6-rhel4.patch
+ext3-include-fixes-2.6-rhel4.patch
+ext3-extents-2.6.9-rhel4.patch
+ext3-mballoc2-2.6.9-rhel4.patch 
+ext3-nlinks-2.6.9.patch
+ext3-ialloc-2.6.patch
+ext3-lookup-dotdot-2.6.9.patch
+ext3-sector_t-overflow-2.6.9-rhel4.patch
+ext3-check-jbd-errors-2.6.9.patch
diff --git a/lustre/kernel_patches/series/ldiskfs2-2.6-sles10.series b/lustre/kernel_patches/series/ldiskfs2-2.6-sles10.series
new file mode 100644 (file)
index 0000000..18a2997
--- /dev/null
@@ -0,0 +1,13 @@
+ext3-wantedi-2.6-rhel4.patch
+ext3-san-jdike-2.6-suse.patch
+iopen-2.6-fc5.patch
+ext3-map_inode_page-2.6-suse.patch
+export-ext3-2.6-rhel4.patch
+ext3-include-fixes-2.6-rhel4.patch
+ext3-extents-2.6.16-sles10.patch
+ext3-mballoc2-2.6-fc5.patch
+ext3-nlinks-2.6.9.patch
+ext3-ialloc-2.6.patch
+ext3-remove-cond_resched-calls-2.6.12.patch
+ext3-filterdata-2.6.15.patch
+ext3-disable-write-barrier-by-default-2.6-sles10.patch
diff --git a/lustre/kernel_patches/series/ldiskfs2-2.6-suse.series b/lustre/kernel_patches/series/ldiskfs2-2.6-suse.series
new file mode 100644 (file)
index 0000000..6a5f05d
--- /dev/null
@@ -0,0 +1,16 @@
+ext3-wantedi-2.6-suse.patch
+ext3-san-jdike-2.6-suse.patch
+iopen-2.6-suse.patch
+export_symbols-ext3-2.6-suse.patch
+ext3-map_inode_page-2.6-suse.patch
+ext3-ea-in-inode-2.6-suse.patch
+export-ext3-2.6-suse.patch
+ext3-include-fixes-2.6-suse.patch
+ext3-extents-2.6.5.patch
+ext3-mballoc2-2.6-suse.patch 
+ext3-nlinks-2.6.7.patch
+ext3-rename-reserve-2.6-suse.patch
+ext3-ialloc-2.6.patch
+ext3-lookup-dotdot-2.6.9.patch
+ext3-sector_t-overflow-2.6.5-suse.patch
+ext3-check-jbd-errors-2.6.5.patch
diff --git a/lustre/kernel_patches/series/ldiskfs2-2.6.12-vanilla.series b/lustre/kernel_patches/series/ldiskfs2-2.6.12-vanilla.series
new file mode 100644 (file)
index 0000000..53c060b
--- /dev/null
@@ -0,0 +1,15 @@
+ext3-wantedi-2.6-rhel4.patch
+ext3-san-jdike-2.6-suse.patch
+iopen-2.6.12.patch 
+ext3-map_inode_page-2.6-suse.patch
+export-ext3-2.6-rhel4.patch
+ext3-include-fixes-2.6-rhel4.patch
+ext3-extents-2.6.12.patch 
+ext3-mballoc2-2.6.12.patch 
+ext3-nlinks-2.6.9.patch
+ext3-ialloc-2.6.patch
+ext3-remove-cond_resched-calls-2.6.12.patch
+ext3-htree-dot-2.6.patch
+ext3-external-journal-2.6.12.patch
+ext3-lookup-dotdot-2.6.9.patch
+ext3-sector_t-overflow-2.6.12.patch
diff --git a/lustre/kernel_patches/series/ldiskfs2-2.6.18-vanilla.series b/lustre/kernel_patches/series/ldiskfs2-2.6.18-vanilla.series
new file mode 100644 (file)
index 0000000..532c05c
--- /dev/null
@@ -0,0 +1,12 @@
+ext3-wantedi-2.6-rhel4.patch
+ext3-san-jdike-2.6-suse.patch
+iopen-2.6-fc5.patch
+ext3-map_inode_page-2.6-suse.patch
+export-ext3-2.6-rhel4.patch
+ext3-include-fixes-2.6-rhel4.patch
+ext3-extents-2.6.18-vanilla.patch
+ext3-mballoc2-2.6.18-vanilla.patch
+ext3-nlinks-2.6.9.patch
+ext3-ialloc-2.6.patch
+ext3-remove-cond_resched-calls-2.6.12.patch
+ext3-filterdata-2.6.15.patch
diff --git a/lustre/ldiskfs2/.cvsignore b/lustre/ldiskfs2/.cvsignore
new file mode 100644 (file)
index 0000000..9ad7f07
--- /dev/null
@@ -0,0 +1,19 @@
+.Xrefs
+config.log
+config.status
+configure
+Makefile
+.deps
+TAGS
+autoMakefile.in
+autoMakefile
+*.ko
+*.mod.c
+.*.cmd
+.*.flags
+.tmp_versions
+linux-stage
+linux
+*.c
+*.h
+sources
diff --git a/lustre/ldiskfs2/Makefile.in b/lustre/ldiskfs2/Makefile.in
new file mode 100644 (file)
index 0000000..d7739d8
--- /dev/null
@@ -0,0 +1,21 @@
+default: all
+
+MODULES := ldiskfs2
+
+# copy makefile over to not break patches
+ext3_extra := $(wildcard @LINUX@/fs/ext3/Makefile)
+
+ext3_headers := $(wildcard @LINUX@/fs/ext3/*.h)
+linux_headers := $(wildcard @LINUX@/include/linux/ext3*.h)
+
+ext3_sources := $(filter-out %.mod.c,$(wildcard @LINUX@/fs/ext3/*.c))
+new_sources := iopen.c iopen.h extents.c mballoc.c
+new_headers := ext3_extents.h
+ldiskfs2_patched_sources := $(notdir $(ext3_sources) $(ext3_headers)) $(new_sources) $(new_headers)
+ldiskfs2_sources := $(ldiskfs2_patched_sources)
+
+ldiskfs2-objs := $(filter %.o,$(ldiskfs2_sources:.c=.o))
+
+EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LUSTRE@ -I@LUSTRE@/ldiskfs2
+
+@INCLUDE_RULES@
diff --git a/lustre/ldiskfs2/autoMakefile.am b/lustre/ldiskfs2/autoMakefile.am
new file mode 100644 (file)
index 0000000..5b7ac7c
--- /dev/null
@@ -0,0 +1,80 @@
+if MODULES
+if LDISKFS
+modulefs_DATA = ldiskfs2$(KMODEXT)
+endif
+endif
+
+ldiskfs2_linux_headers := $(addprefix linux/,$(subst ext3,ldiskfs2,$(notdir $(linux_headers))))
+
+$(filter %.c,$(ldiskfs2_patched_sources)): sources $(ldiskfs2_linux_headers) $(filter %.h,$(ldiskfs2_patched_sources))
+
+ldiskfs2_sed_flags = \
+       -e "s/dx_hash_info/ext3_dx_hash_info/g" \
+       -e "s/dir_private_info/ext3_dir_private_info/g" \
+       -e "s/DX_HASH/EXT3_DX_HASH/g" \
+       -e "s/reserve_window/ext3_reserve_window/g" \
+       -e "s/rsv_window_add/ext3_rsv_window_add/g" \
+       -e "s/EXT3/LDISKFS2/g" -e "s/ext3/ldiskfs2/g"
+
+%.c: linux-stage/fs/ext3/%.c
+       sed $(strip $(ldiskfs2_sed_flags)) $< > $@
+
+%.h: linux-stage/fs/ext3/%.h
+       sed $(strip $(ldiskfs2_sed_flags)) $< > $@
+
+linux/ldiskfs2%.h: linux-stage/include/linux/ext3%.h
+       sed $(strip $(ldiskfs2_sed_flags)) $< > $@
+
+#
+# FIXME: we need to grab the series in configure somehow
+# (see bug 1679)
+#
+series := @top_srcdir@/lustre/kernel_patches/series/ldiskfs2-$(LDISKFS_SERIES)
+patches := @top_srcdir@/lustre/kernel_patches/patches
+
+sources: $(ext3_sources) $(ext3_headers) $(linux_headers) $(series)
+       rm -rf linux-stage linux sources $(ldiskfs2_SOURCES)
+       mkdir -p linux-stage/fs/ext3 linux-stage/include/linux
+       cp $(ext3_sources) $(ext3_headers) $(ext3_extra) linux-stage/fs/ext3
+       cp $(linux_headers) linux-stage/include/linux
+if USE_QUILT
+       ln -s ../$(patches) linux-stage/patches
+       ln -s ../$(series) linux-stage/series
+       cd linux-stage && quilt push -a -q
+else
+       @echo -n "Applying ext3 patches:"
+       @cd linux-stage && for i in $$(<../$(series)) ; do \
+               echo -n " $$i" ; \
+               patch -s -p1 < ../$(patches)/$$i || exit 1 ; \
+       done
+       @echo
+endif
+       mkdir linux
+       @echo -n "Replacing 'ext3' with 'ldiskfs2':"
+       @for i in $(notdir $(ext3_headers) $(ext3_sources)) $(new_sources) ; do \
+               echo -n " $$i" ; \
+               sed $(strip $(ldiskfs2_sed_flags)) \
+                       linux-stage/fs/ext3/$$i > $$i ; \
+       done
+       @for i in $(subst ext3,,$(notdir $(linux_headers) $(new_headers))) ; do \
+               echo -n " ext3$$i" ; \
+               sed $(strip $(ldiskfs2_sed_flags)) \
+                       linux-stage/include/linux/ext3$$i \
+                       > linux/ldiskfs2$$i ; \
+       done
+       @echo
+       touch sources
+
+foo-check:
+       @echo "ldiskfs2_sources: $(ldiskfs2_sources)"
+       @echo "ldiskfs2_SOURCES: $(ldiskfs2_SOURCES)"
+       @echo "ldiskfs2_headers: $(ldiskfs2_headers)"
+       @echo "ldiskfs2_objects: $(ldiskfs2_objects)"
+       @echo "ldiskfs2_OBJECTS: $(ldiskfs2_OBJECTS)"
+       @echo "ldiskfs2_LDADD: $(ldiskfs2_LDADD)"
+
+MOSTLYCLEANFILES := @MOSTLYCLEANFILES@
+CLEANFILES = sources $(notdir $(linux_headers) $(ext3_headers) $(ext3_sources) $(new_sources) $(new_headers))
+
+clean: clean-am
+       rm -rf linux linux-stage
index d18b255..fe3989f 100644 (file)
@@ -15,5 +15,5 @@ autoMakefile
 .tmp_versions
 .depend
 sources
 .tmp_versions
 .depend
 sources
-fsfilt_ldiskfs.*
-fsfilt-ldiskfs.*
+fsfilt_ldiskfs*
+fsfilt-ldiskfs*
index 2e31097..6a8feb5 100644 (file)
@@ -1,5 +1,6 @@
 MODULES := lvfs
 @SERVER_TRUE@MODULES += fsfilt_@BACKINGFS@
 MODULES := lvfs
 @SERVER_TRUE@MODULES += fsfilt_@BACKINGFS@
+@LDISKFS_TRUE@MODULES += fsfilt_ldiskfs2
 @QUOTA_TRUE@MODULES += quotafmt_test
 
 lvfs-objs := lvfs_common.o lvfs_linux.o fsfilt.o upcall_cache.o
 @QUOTA_TRUE@MODULES += quotafmt_test
 
 lvfs-objs := lvfs_common.o lvfs_linux.o fsfilt.o upcall_cache.o
@@ -9,12 +10,13 @@ lvfs-objs := lvfs_common.o lvfs_linux.o fsfilt.o upcall_cache.o
 
 ifeq ($(PATCHLEVEL),6)
 fsfilt_@BACKINGFS@-objs := fsfilt-@BACKINGFS@.o
 
 ifeq ($(PATCHLEVEL),6)
 fsfilt_@BACKINGFS@-objs := fsfilt-@BACKINGFS@.o
+fsfilt_ldiskfs2-objs := fsfilt-ldiskfs2.o
 
 $(obj)/fsfilt-%.c: $(obj)/fsfilt_%.c
        ln -s $< $@
 endif
 
 # for <ext3/xattr.h> on 2.6
 
 $(obj)/fsfilt-%.c: $(obj)/fsfilt_%.c
        ln -s $< $@
 endif
 
 # for <ext3/xattr.h> on 2.6
-EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LUSTRE@ -I@LUSTRE@/ldiskfs
+EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LUSTRE@ -I@LUSTRE@/ldiskfs -I@LUSTRE@/ldiskfs2
 
 @INCLUDE_RULES@
 
 @INCLUDE_RULES@
index 61d8fdf..77faaf2 100644 (file)
@@ -21,12 +21,24 @@ modulefs_DATA := lvfs$(KMODEXT)
 
 if SERVER
 modulefs_DATA += fsfilt_$(BACKINGFS)$(KMODEXT)
 
 if SERVER
 modulefs_DATA += fsfilt_$(BACKINGFS)$(KMODEXT)
+
+if LDISKFS
+
+modulefs_DATA += fsfilt_ldiskfs2$(KMODEXT)
+sources: fsfilt_$(BACKINGFS).c fsfilt_ldiskfs2.c
+       touch sources
+
+else #LDISKFS
+
 sources: fsfilt_$(BACKINGFS).c
        touch sources
 sources: fsfilt_$(BACKINGFS).c
        touch sources
-else
+
+endif #LDISKFS
+
+else #SERVER
 sources:
 
 sources:
 
-endif
+endif #SERVER
 
 fsfilt_extN.c: fsfilt_ext3.c
        sed -e "s/EXT3/EXTN/g" -e "s/ext3/extN/g" $< > $@
 
 fsfilt_extN.c: fsfilt_ext3.c
        sed -e "s/EXT3/EXTN/g" -e "s/ext3/extN/g" $< > $@
@@ -39,8 +51,18 @@ ldiskfs_sed_flags = \
        -e "s/rsv_window_add/ext3_rsv_window_add/g" \
        -e "s/EXT3/LDISKFS/g" -e "s/ext3/ldiskfs/g"
 
        -e "s/rsv_window_add/ext3_rsv_window_add/g" \
        -e "s/EXT3/LDISKFS/g" -e "s/ext3/ldiskfs/g"
 
+ldiskfs2_sed_flags = \
+       -e "s/dx_hash_info/ext3_dx_hash_info/g" \
+       -e "s/dir_private_info/ext3_dir_private_info/g" \
+       -e "s/DX_HASH/EXT3_DX_HASH/g" \
+       -e "s/reserve_window/ext3_reserve_window/g" \
+       -e "s/rsv_window_add/ext3_rsv_window_add/g" \
+       -e "s/EXT3/LDISKFS2/g" -e "s/ext3/ldiskfs2/g"
+
 fsfilt_ldiskfs.c: fsfilt_ext3.c
        sed $(strip $(ldiskfs_sed_flags)) $< > $@
 fsfilt_ldiskfs.c: fsfilt_ext3.c
        sed $(strip $(ldiskfs_sed_flags)) $< > $@
+fsfilt_ldiskfs2.c: fsfilt_ext3.c
+       sed $(strip $(ldiskfs2_sed_flags)) $< > $@
 fsfilt_ldiskfs_quota.h: fsfilt_ext3_quota.h
        sed $(strip $(ldiskfs_sed_flags)) $< > $@
 
 fsfilt_ldiskfs_quota.h: fsfilt_ext3_quota.h
        sed $(strip $(ldiskfs_sed_flags)) $< > $@
 
@@ -77,5 +99,5 @@ DIST_SOURCES = fsfilt.c fsfilt_ext3.c fsfilt_reiserfs.c lvfs_common.c \
         # quotacheck_test.c quotactl_test.c fsfilt_ext3_quota.h
 
 MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
         # quotacheck_test.c quotactl_test.c fsfilt_ext3_quota.h
 
 MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-CLEANFILES = fsfilt-*.c fsfilt_ldiskfs.c fsfilt_extN.c sources
+CLEANFILES = fsfilt-*.c fsfilt_ldiskfs*.c fsfilt_extN.c sources