PJ40897: TFS BACKUP COLLECTION FILE ATTRIBUTE SUPPORT
Closed as program error.
See Problem Summary.
APAR NUMBER: PJ40897 PRODUCT: z/TPF FUNCTIONAL AREA: FILE SYSTEM SUPPORT SHIPPED IN PUT: 10 ABSTRACT: Enhancement to add z/TPF collection support file system (TFS) directory backup support. PACKAGE CONTENTS: Source Segments: (C) base/filesys/exp/CFVS.exp (C) base/filesys/ffs/ffs_vnops.c (C) base/filesys/include/sys/tfs/tfs_extern.h (C) base/filesys/include/sys/tfs/tfs_inode.h (C) base/filesys/mfs/mfs_vnops.c (C) base/filesys/pfs/pfs_vnops.c (C) base/filesys/tfs/tfs_dump.c (C) base/filesys/tfs/tfs_fattr.c (C) base/filesys/tfs/tfs_rename.c (C) base/filesys/tfs/tfs_scan.c (C) base/filesys/tfs/tfs_subr.c (C) base/filesys/tfs/tfs_vfsops.c (C) base/filesys/tfs/tfs_vnops.c (C) base/filesys/tpf/cbot.c (C) base/filesys/tpf/tpf_fileAttributes.c (C) base/filesys/vcfx/vcfx_vnops.c (C) base/include/tpf/cfattr.h (C) base/macro/inode.mac (C) base/rt/bkd7.asm (C) base/rt/cj001.cpy (C) base/rt/cj323.cpy Object Only Binaries: None. Configuration Independent Binaries: (C) base/filesys/obj/ffs_vnops.o (C) base/filesys/obj/mfs_vnops.o (C) base/filesys/obj/pfs_vnops.o (C) base/filesys/obj/tfs_dump.o (C) base/filesys/obj/tfs_fattr.o (C) base/filesys/obj/tfs_rename.o (C) base/filesys/obj/tfs_scan.o (C) base/filesys/obj/tfs_subr.o (C) base/filesys/obj/tfs_vfsops.o (C) base/filesys/obj/tfs_vnops.o (C) base/filesys/obj/tpf_fileAttributes.o (C) base/filesys/obj/vcfx_vnops.o (C) base/lib/libCJ00.so (C) base/load/CJ00.so (C) base/obj/cj003.o (C) base/obj/cj005.o (C) base/stdlib/libCFVS.so (C) base/stdload/CFVS.so Support Files: base/filesys/lst/CFVS.map base/filesys/lst/ffs_vnops.lst base/filesys/lst/mfs_vnops.lst base/filesys/lst/pfs_vnops.lst base/filesys/lst/tfs_dump.lst base/filesys/lst/tfs_fattr.lst base/filesys/lst/tfs_rename.lst base/filesys/lst/tfs_scan.lst base/filesys/lst/tfs_subr.lst base/filesys/lst/tfs_vfsops.lst base/filesys/lst/tfs_vnops.lst base/filesys/lst/tpf_fileAttributes.lst base/filesys/lst/vcfx_vnops.lst base/lst/cj003.lst base/lst/cj005.lst base/lst/CJ00.map OTHER BINARIES TO BUILD: YES (C) <sys>/load/BKD7.so (C) <sys>/load/CBOT.so (C) <sys>/obj/bkd7.o (C) <sys>/obj/cbot.o COMMENTS: A new file attribute is required which will tell the TFS to maintain two collection support dictionaries for each file system directory. The root i-node should also be upgraded to the latest version so that the backup collection file attribute may be used to protect the root directory as well. Also, the file system might encounter errors if loosely coupled, one processor mounts a file system on a mount point and another processor subsequently deletes that mount point directory. The deleted mount point directory's i-node is returned to the free list. If all of the i-nodes in the system are cycled through (many file creates and deletes) and that i-node is redispensed on the processor which is still maintaining the mount, the file system will detect this and error out. We should handle this condition gracefully. Additionally: - the file attribute support code contains an erroneous check of the IfileAttribute structure's version - some confusing messages in zfile fsck exist which warn of potential problems before we know if they actually are problems - and some other minor bugs exist.
SOLUTION: * Implemented a new file attribute for TFS directories. When set (1) a backup collection is created and maintained for the directory. When cleared (0) the support is disabled for the directory and the backup collection is deleted. This attribute is settable on all directories that are created after this apar is installed. The attribute is inherited by all child directories that are created while the parent has it's "backup collection" attribute set (1). Recovery automatically occurs if a problem is encountered with primary collection. * The root i-node is upgraded to the latest i-node version (on the first IPL) so that the backup collection file attribute may be used to protect the root directory as well. * The fsck utility has been updated to recognize this new backup collection and verify it. * The fsck utility may proceed further (rather than terminate) if an error is encountered with the primary collection of a directory, since it can recover using the backup collection. * The fsck utility was updated to remove some "potential lost inode" messages which cause confusion/alarm before we have confirmed whether a problem exists or not. These were unnecessary and provided little benefit. The zfile fsck output should be a little cleaner (less verbose) in some cases. * Code was added so that if we attempt to obtain a new i-node from the free list but we find that we already have it in our processor's hash table, we return it to the end of the free list and "pick" another i-node off of the list. This avoids the rare problem described above. * The file attribute code was updated to fix a bad version check on the IfileAttribute structure. * Fixed locking hole in "zoodb migrate IFSX" and "zavfs migrate shadowroot". * Also, added code to prevent system error 000004 (OPR-4) in CJ00 when two simultaneous attempts are made to delete the same data definition. * Fixed bug(s) in the MFS, FFS and PFS file attribute support code which may not reject an attempt to delete the "dir size max" attribute correctly. * Fixed bug in tpf_fileAttributes.c where vput was being done incorrectly instead of vputx during "set file attribute" processing. * Fixed bug in tfs_scan.c where fsck does not write changes to core copies of v-node/i-node. * Optimization to rename() API code to utilize i-node copy of dotdot (..) entry to avoid collection support overhead. COREQS: NO None. MIGRATION CONSIDERATIONS: YES Functional, automation, and operation changes: Changed: ZFILE ATTR Application programming interface (API) changes: Changed (information only changes): tpf_open tpf_openZdsmgDD tpf_fopenZdsmgDD tpf_setFileAttribute tpf_fsetFileAttribute tpf_getFileAttribute tpf_fgetFileAttribute IfileAttribute (structure, not API) Installation validation: Basic validation after install: Create a new directory - zfile mkdir /mydir Verify "backup collection" attribute is displayed and is off - zfile attr -a /mydir Set "backup collection" attribute on - zfile attr -s /mydir 'backup collection=1' Verify "backup collection" attribute is displayed and is on - zfile attr -a /mydir Create and delete files within /mydir with no errors Remove /mydir test directory - zfile rm -r /mydir Database changes: Recoup descriptor BKD7 (file system descriptor) was updated to recognize the backup collection if it exists. Performance or tuning changes: Installing this apar should not impact performance. Enabling the "backup collection" attribute will cause directory updates (writes) to be made to two collections resulting in extra I/O. Balance the need for directory integrity vs. performance, especially for heavily changed directories (directories where many file creates and deletes frequently occur). Coexistence, migration, and fallback considerations: Do not enable the "backup collection" attribute until all processors have this apar applied and you are sure that you do not need to fallback. This is because we do not want to create an "out of sync condition" between a primary and backup collection if a directory is changed and some code is backlevel. BUILD COMMANDS AND INSTRUCTIONS: YES #maketpf commands for linux maketpf -f CFVS ffs_vnops.o mfs_vnops.o pfs_vnops.o tfs_dump.o tfs_fattr.o tfs_rename.o tfs_scan.o tfs_subr.o tfs_vfsops.o tfs_vnops.o tpf_fileAttributes.o vcfx_vnops.o maketpf -f CJ00 cj003.o cj005.o maketpf -f CBOT cbot.o maketpf -f BKD7 bkd7.o maketpf CFVS link TPF_VERIFY_LINK_REFS=NO maketpf CJ00 link TPF_VERIFY_LINK_REFS=NO maketpf CBOT link TPF_VERIFY_LINK_REFS=NO maketpf BKD7 link maketpf CFVS link maketpf CJ00 link maketpf CBOT link UPDATED INFORMATION UNITS: YES z/TPF and z/TPFDF Migration Guide: PUT 2 and Later z/TPF C/C++ Language Support User's Guide z/TPF Concepts and Structures z/TPF Database User's Guide z/TPF Operations See your IBM representative if you need additional information. DOWNLOAD INSTRUCTIONS: http://www.ibm.com/software/htp/tpf/maint/maintztpf.html APAR URL: http://www.ibm.com/software/htp/tpf/ztpfmaint/put10/PJ40897.htm
Reported component name
Reported component ID
NoSpecatt / Xsystem
Last modified date
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fixed component name
Fixed component ID
Applicable component levels