LU-16664 build: Debian server fails building crypto.c When building deb files against a server built without CONFIG_FS_ENCRYPTION it still attempts to build crypto.c when it should not. Test-Parameters: trivial Fixes: 068e5f13fb ("LU-13743 build: Explicitly require encryption support") Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: Id1e67daa7b021fdfee49be4eb0beb2b86ca62c39 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50406 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Sebastien Buisson <sbuisson@ddn.com> Reviewed-by: xinliang <xinliang.liu@linaro.org> Reviewed-by: jsimmons <jsimmons@infradead.org> Reviewed-by: Jian Yu <yujian@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16374 ldiskfs: round-up enc file size When accessing encrypted files on targets mounted as ldiskfs, the sizes must be rounded up to the next encryption block size. This is required in order to read or write full encryption blocks. Signed-off-by: Sebastien Buisson <sbuisson@ddn.com> Change-Id: I6d08a2eb34f0dff864891a4e3e77977688412ec8 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49410 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-13743 build: Explicitly require encryption support Linux commit v5.18-rc5-17-gb1241c8eb977 ext4: move ext4 crypto code to its own file crypto.c Update the ldiskfs Makefile to exclude crypto.c when CONFIG_FS_ENCRYPTION is not enabled. Test-Parameters: trivial Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: Ic8a40f3d395286bb52ed20693fd7cc4755b10556 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/39243 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: jsimmons <jsimmons@infradead.org> Reviewed-by: Neil Brown <neilb@suse.de> Reviewed-by: Yang Sheng <ys@whamcloud.com> Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
LU-15848 ldiskfs: escape encrypted file names When a Lustre MDT is mounted as ldiskfs, the names of the encrypted files have to be escaped to avoid breaking the shell. On CentOS 7, the LDISKFS_ENCRYPT_FL flag does not exist. So we add it, and when the target is mounted as ldiskfs (LDISKFS_MOUNT_DIRDATA flag not present) we critical-encode encrypted file names before presentation. And conversely, we critical-decode names upon lookup. On CentOS 8, the LDISKFS_ENCRYPT_FL flag exists. The fscrypt functions from kernel 4.18 are also wired up, but they all refer to -EOPNOTSUPP or equivalent, so they cannot be used to present usable names. So when the target is mounted as ldiskfs (LDISKFS_MOUNT_DIRDATA flag not present) we proceed to critical-encoding of encrypted file names before presentation, and to critical-decoding upon lookup. Signed-off-by: Sebastien Buisson <sbuisson@ddn.com> Change-Id: Iaca467eaa233be8142356efa822962953754c2ce Reviewed-on: https://review.whamcloud.com/47309 Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-13783 ldiskfs: Add support for mainline 5.8 kernel Various changes needed for 5.8 over 5.4: - ext4_mark_inode_dirty is now a macro, so export __export_mark_inode_dirty instead - procfs additions need to use 'struct proc_ops' - inode-test.c is a new C file that we MUST NOT build - various ordinary conflicts Test-Parameters: trivial Signed-off-by: Mr NeilBrown <neilb@suse.de> Change-Id: I681ab26c60fb35a1ef5f518ee7cac8766e6fde47 Reviewed-on: https://review.whamcloud.com/40373 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Yang Sheng <ys@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-6030 ldiskfs: clean up ext4-fiemap patch Move ext4-fiemap patch to osd-ldiskfs. So we can remove this patch entirely. Signed-off-by: Yang Sheng <yang.sheng@intel.com> Change-Id: I639733f6f106398bbc3d5e2ffc6fa8a06ffe867f Reviewed-on: http://review.whamcloud.com/13571 Tested-by: Jenkins Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2757 dynlocks: move into osd-ldiskfs Commit 43603bd1 (LU-1548 osd: move i_htree_lock to iam container) eliminated the use of dynlocks inside ldiskfs. Now that it's only used in the osd-ldiskfs code, we can move it under osd-ldiskfs/, and eliminate a patch we apply during build. Long term dynlocks will never merged into the ext4 work so it makes sense to move it to the osd-ldisk layer. Also the mdd layer was carrying techinical debt of dynlocks as well so this patch removes it from that layer. This work helps us move forward to a patchless ldiskfs in the future. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: I3d2ca2317426df3a7f3855d85a834a37091a78bd Reviewed-on: http://review.whamcloud.com/5282 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-3462 ldiskfs: Subsume ldiskfs's build system into lustre Remove ldiskfs's independant build system (configure, spec file, etc.) and merge its build into lustre's build system. Move the ldiskfs/ldiskfs directory up one level. The extra directory level is no longer needed without the independant ldiskfs build system. Add a make dependency on ldiskfs's "sources" target in ldiskfs/autoMakefile.am rather than explicitly launching a separate make instance from the top level autoMakefile.am. Remove unused "sources" targets in libcfs, lnet, and lustre/obdclass. Improve the handling of the --disable-ldiskfs option, and make it interact with other configure options more cleanly. Change-Id: Id0787f27269e938032e480c7c627327c0adf2672 Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov> Reviewed-on: http://review.whamcloud.com/6850 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Minh Diep <minh.diep@intel.com> Reviewed-by: Brian J. Murrell <brian.murrell@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1199 build: Refactor ldiskfs's build system Lustre has a complicated build system that combines automake files and the kernel's Makefile.in build system in a rather serpentine system that has long chains of makefile includes, making it very difficult for the reader to ever know exactly which targets and reles will either be required or available under any specific set of conditions. The good news is that none of that is required by ldiskfs because ldiskfs is only built for kernel-space Linux. We only need one fairly straight forward build path. To simplify the build system, we: - Remove Rules.in - Remove all autoMakefile.am files - Remove confusing build/Makefile - Combine the three .m4 files into one, since that was just a hold-over from Lustre's build system. - Cleanup and improve some of the m4 macros - Remove the multi-level build/ subdirectory tree and replace with single-level config subdirectory. - Fix the ldiskfs debuginfo package (actually contains the patched source of ldiskfs!) - Simplify autogen.sh - Update .gitignore files Change-Id: I9e6112c150c1e0f9076d5e689b69534eab7a964b Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov> Reviewed-on: http://review.whamcloud.com/4728 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Brian J. Murrell <brian.murrell@intel.com> Reviewed-by: Minh Diep <minh.diep@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Branch HEAD Initial commit of new ldiskfs module. This is based on ldiskfs from b1_6; patches and series files are identical to those found there. b=12068 i=mjmac i=brian