Whamcloud - gitweb
LU-15910 tests: skip sanity/413g for SSK
[fs/lustre-release.git] / ldiskfs / autoMakefile.am
index b90fdcd..3bd7483 100644 (file)
@@ -14,10 +14,13 @@ ldiskfs_linux_headers := $(addprefix linux/,$(subst ext4,ldiskfs,$(notdir $(linu
 
 $(filter %.c,$(ldiskfs_patched_sources)): sources $(ldiskfs_linux_headers) $(filter %.h,$(ldiskfs_patched_sources))
 
+# Convert LDISKFS_SUPER_MAGIC back to EXT4_SUPER_MAGIC so that the ldiskfs
+# code can use the existing kernel headers instead of defining this itself.
 ldiskfs_sed_flags = \
        -e "s/dx_hash_info/ext4_dx_hash_info/g" \
        -e "s/DX_HASH/EXT4_DX_HASH/g" \
-       -e "s/EXT4/LDISKFS/g" -e "s/ext4/ldiskfs/g"
+       -e "s/EXT4/LDISKFS/g" -e "s/ext4/ldiskfs/g" \
+       -e "s/LDISKFS_SUPER_MAGIC/EXT4_SUPER_MAGIC/g"
 
 %.c: linux-stage/fs/ext4/%.c
        sed $(strip $(ldiskfs_sed_flags)) $< > $@
@@ -57,6 +60,7 @@ endif
        mkdir -p linux trace/events
        @echo -n "Replacing 'ext4' with 'ldiskfs':"
        for i in $(notdir $(backfs_headers) $(backfs_sources)) $(new_sources) ; do \
+               [ -f linux-stage/fs/ext4/$$i ] || continue; \
                echo -n " $$i" ; \
                sed $(strip $(ldiskfs_sed_flags)) \
                        linux-stage/fs/ext4/$$i > $$i ; \