LU-17243 build: compatibility updates for kernel 6.6 linux kernel v5.19-rc1-4-gc4f135d64382 workqueue: Wrap flush_workqueue() using a macro linux kernel v6.5-rc1-7-g20bdedafd2f6 workqueue: Warn attempt to flush system-wide workqueues. If __flush_workqueue(system_wq) is not available fall back to flush_scheduled_work() linux kernel v6.5-rc1-92-g13bc24457850 fs: rename i_ctime field to __i_ctime Use accessors for ctime. Provide replacements for older kernels. linux kernel v6.5-rc1-95-g0d72b92883c6 fs: pass the request_mask to generic_fillattr Provide request_mask argument where needed. Linux commit v6.5-rc2-20-g2ddd3cac1fa9 nsproxy: Convert nsproxy.count to refcount_t Provide a wrapper for inc/dec of nsproxy.count linux kernel v6.5-rc4-110-gcf95e337cb63 mm: delete mmap_write_trylock() and vma_try_start_write() Use down_write_trylock directly mmap_write_trylock In preparation for kernel 6.7 the remaining inode time accessors will be preferred: linux kernel v6.6-rc5-86-g12cd44023651 fs: rename inode i_atime and i_mtime fields Use accessors for atime and mtime. Provide replacements for older kernels. Test-Parameters: trivial Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: Ide6c2e3e8db532449850b145c2d61b972d21f649 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52908 Tested-by: Maloo <maloo@whamcloud.com> Tested-by: jenkins <devops@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Yang Sheng <ys@whamcloud.com>
LU-17334 lmv: exclude newly added MDT in mkdir Exclude newly added MDT in QoS mkdir for 30 seconds in case connections between MDTs are not ready, which may cause lookup fail. Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com> Change-Id: Ibb5e6eda29ddfff8f66708d72e33453a96f5e7ef Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53860 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-14535 quota: get all quota info in LFS This patch adds option "-a" for LFS to get the quota info of all quota IDs. it iterates quota setting saved in global quota setting files "quota_master/md-0x0" and "quota_master/dt-0x0" from QMT and iterates the quota usage info saved in acct quota files in the backend FS (LDiskFS or ZFS) from QSDs, then merge the two kinds of quota info at client and print it in the similar way as "lfs quota -u|-g|-p". $lfs quota -a -u /mnt/lustre Filesystem /mnt/lustre, Disk usr quotas quota_id kbytes quota limit grace files quota limit grace root 9684 0 0 - 1019 0 0 - bin 4 0 102400 - 1 0 10240 - daemon 4 0 102400 - 1 0 10240 - adm 4 0 102400 - 1 0 10240 - lp 4 0 102400 - 1 0 10240 - sync 4 0 102400 - 1 0 10240 - shutdown 4 0 102400 - 1 0 10240 - halt 4 0 102400 - 1 0 10240 - mail 4 0 102400 - 1 0 10240 - $lfs quota -a -g /mnt/lustre Filesystem /mnt/lustre, Disk grp quotas quota_id kbytes quota limit grace files quota limit grace root 9684 0 0 - 1019 0 0 - bin 4 0 204800 - 1 0 20480 - daemon 4 0 204800 - 1 0 20480 - adm 4 0 204800 - 1 0 20480 - lp 4 0 204800 - 1 0 20480 - sync 4 0 204800 - 1 0 20480 - shutdown 4 0 204800 - 1 0 20480 - halt 4 0 204800 - 1 0 20480 - mail 4 0 204800 - 1 0 20480 - This patch also fixes an deadlock issue in qmt_pool_recalc, the rw_semaphore "qmt_pool_info.qpi_sarr.osts.op_rw_sem" has been acquired in qmt_pool_recalc (read mode), but it was acquired once more in qmt_seed_glbe_all (read mode) and will be stuck if there is a pending write mode lock acquisition from another thread. qsd_reint_qpool D Call Trace: schedule+0x29/0x70 rwsem_down_read_failed+0x105/0x1c0 call_rwsem_down_read_failed+0x18/0x30 down_read+0x20/0x40 qmt_seed_glbe_all+0x3a0/0x800 [lquota] qmt_site_recalc_cb+0x3c7/0x800 [lquota] cfs_hash_for_each_tight+0x11e/0x330 cfs_hash_for_each+0x10/0x20 [libcfs] qmt_pool_recalc+0x9fc/0x1310 [lquota] llog_process_th D Call Trace: schedule+0x29/0x70 rwsem_down_write_failed+0x215/0x3c0 call_rwsem_down_write_failed+0x17/0x30 down_write+0x2d/0x3d lu_tgt_pool_remove+0x36/0x1e0 [obdclass] qmt_pool_add_rem+0x655/0x920 [lquota] qmt_pool_rem+0x10/0x20 [lquota] lod_pool_remove_q+0xd6/0x1d0 [lod] class_process_config+0x16f2/0x2b20 class_config_llog_handler+0x839/0x1540 llog_process_thread+0x913/0x1c10 llog_process_thread_daemonize+0x9f/0xe0 Test-Parameters: testlist=sanity-quota env=SLOW=yes,ONLY=49,NUM_QIDS=20000 Change-Id: I08feb928fbf34635ec9c5c341de993c718798dc9 Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/42098 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-17434 lmv: add exclude list for remote dir Apache Spark creating a _temporary subdirectory for staging files, and it should be created on the same MDT as its parent directory. Add a tunable lmv.*.qos_exclude_prefixes, if directory prefix is in this list, lmv_create() should put it on its parent MDT. This prefix list follows the same rule of shell environment PATH: use ':' as separator for prefixes. And for convenience '+/-' can be used to add/remove prefixes. Add sanity 413k. Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com> Change-Id: I4c8a118f0630c19054934a87bee3599bdb1fe7bb Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53780 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Sebastien Buisson <sbuisson@ddn.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-6142 lmv: Fix style issues for lmv_obd.c This patch fixes issues reported by checkpatch for file lustre/lmv/lmv_obd.c Test-Parameters: trivial Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com> Change-Id: I3d1f16b4b33bd6000855e93117b3f73344605e98 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54108 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Timothy Day <timday@amazon.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-17334 lmv: handle object created on newly added MDT When a new MDT is added to a filesystem without no_create, then a new object is created on the MDT relatively quickly after it is added to the filesystem, in particular because the new MDT would be preferred by QOS space balancing due to lots of free space. However, it might take a few seconds for the addition of the new MDT to be propagated across all of the clients, so there is a risk that one client creates a directory on an MDT that a client is not yet aware of, which returns an error to the application immediately. This patch fixes the issue by adding lmv_tgt_retry() that will retry to use the MDT and wait for some number of seconds for the filesystem layout to be updated if the MDT index an existing file/directory is not found. Commands that depend on user input, like 'lfs mkdir -i' and 'lfs df' and round-robin MDT allocation will continue to use lmv_tgt() which doesn't retry in case user specifies wrong MDT index, otherwise it can hang the command for an extended period of time. Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com> Change-Id: Idb0cf65e95f665628d6799298732b7a06cde4a86 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53363 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Jian Yu <yujian@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16314 llite: Migrate LASSERTF %p to %px This change covers lustre/ec through lustre/mgs and converts LASSERTF statements to explicitly use %px. Use %px to explicitly report the non-hashed pointer value messages printed when a kernel panic is imminent. When analyzing a crash dump the associated kernel address can be used to determine the system state that lead to the system crash. As crash dumps can and are provided by customers from production systems the use of the kernel command line parameter: no_hash_pointers is not always possible. Ref: Documentation/core-api/printk-formats.rst Test-Parameters: trivial HPE-bug-id: LUS-10945 Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: I708d9ef60c63f5b4006c7986599a2f39fc9e5fdf Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51213 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16823 lustre: test if large nid is support Update all LNetGetId() calls to use large NIDs if the connect flags report large NID support. For the case of lmv_setup() we update setting qos_rr_index, to avoid the thundering herd, using nidhash(). Change-Id: I80fda9454f154e27fbc75abb1899c0ccca03097b Signed-off-by: James Simmons <jsimmons@infradead.org> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53398 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-8191 lustre: convert lmv,lod,lov functions to static Static analysis shows that a number of functions could be made static. This patch declares several functions in lmv, lod, and lov static. Also, remove one unused function: lov_lsm_entry() Another function is intentionally unused for debugging purposes. It was detected by static analysis, but it has been left untouched. Test-Parameters: trivial Signed-off-by: Timothy Day <timday@amazon.com> Change-Id: If409226ea201587c7f95d4a65ffaef72671b5ac2 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51479 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-9859 libcfs: refactor libcfs initialization. Many lustre modules depend on libcfs having initialized properly, but do not explicit check that it did. When lustre is built as discrete modules, this does not cause a problem because if the libcfs module fails initialization, the other modules don't even get loaded. When lustre is compiled into the kernel, all module_init() routines get run, so they need to check the required initialization succeeded. This patch splits out the initialization of libcfs into a new libcfs_setup(), and has all modules call that. The misc_register() call is kept separate as it does not allocate any resources and if it fails, it fails hard - no point in retrying. Other set-up allocates resources and so is best delayed until they are needed, and can be worth retrying. Ideally, the initialization would happen at mount time (or similar) rather than at load time. Doing this requires each module to check dependencies when they are activated rather than when they are loaded. Achieving that is a much larger job that would have to progress in stages. For now, this change ensures that if some initialization in libcfs fails, other modules will fail-safe. Linux-commit: 64bf0b1a079d61e9e059b9dc7a58e064c7d994ae Change-Id: I6b5ecdba0defc6e033f78d8fc2b9be9e26c7f720 Signed-off-by: Mr. NeilBrown <neilb@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52700 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Timothy Day <timday@amazon.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-12998 mds: add no_create parameter to stop creates Add an target tunable parameter and mount option "no_create" to disable new *directory* creation on an MDT. This sends the flag OS_STATFS_NOCREATE to the clients, and the DNE MDT space balance will avoid selecting that MDT when creating a new subdirectory, without disabling access to existing files/dirs. This allows "soft disabling" an MDT in advance of storage upgrades to minimize new directories and files created on that MDT, reduce future migration, and/or backup/restore workload. As yet it does not totally disable *file* creation on the MDT, but it may be extended to do so in the future. This is analogous to the "no_precreate" option that was added on the OSTs, and "no_create" has been added to the OSTs for consistency ("no_precreate" is kept for compatibility for now). Test-Parameters: testlist=conf-sanity env=ONLY=112b,ONLY_REPEAT=50 Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com> Change-Id: I53cfb48ade2f844b18bfc630e7fcea6de9ce7057 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47124 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-17193 build: fix gcc-12 compiler warnings Building on el9.2 hit a couple of new errors in configure, ex: ((struct inode_operations *)1)->fileattr_get() hits: error: array subscript 0 is outside array bounds of ‘struct inode_operations[0]’ A few instances of QCTL_COPY() should be QCTL_COPY_NO_PNAME() as the zero-length array to hold the pool name is not allocated in these cases. Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: I72bda8b46c51dbd42fb42bf569ba29572526acfe Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52687 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: xinliang <xinliang.liu@linaro.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-17087 lmv: update stale tgt statfs every 1 hour Some tgt statfs may not be initialized upon mount due to network issues, if the filesystem is imbalanced, these tgts won't be chosen to create directory because their bavail and ffree are 0. If MDT is chosen by QoS, update tgt statfs that is one hour overdue, otherwise check update the statfs of the tgt that is chosen. Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com> Change-Id: I06af8b8bd342f66cb794471df3ee0f3b127ffe05 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52270 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
LU-16796 obd: Change struct obd_device to use kref This patch changes struct obd_device to use kref(refcount_t) instead of atomic_t Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com> Change-Id: Ia8539abb11357b41edd4cf532896d3bc1e66e92f Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52179 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com> Reviewed-by: Neil Brown <neilb@suse.de> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-14361 statahead: add statahead advise IOCTL This patch reuse ioctl(LL_IOC_LADVISE2) for statahead advise. This allows userspace programs to advise the kernel statahead of the order that they will be traversing a directory, so that the client can prefetch inode attributes from the MDT, similar to what posix_fadvise(POSIX_FADV_SEQUENTIAL) does for file data. After patched mdtest via adding this statahead IOCTL hint, it can support mdtest benchmark with regularized file naming format: mdtest.$rank.$i The usage of this statahead advise IOCTL could be as follows: open(dir); ioctl(dir_fd, IOC_LADVISE2, ...); stat mdtest.0.0; stat mdtest.0.1; stat mdtest.0.2; stat mdtest.0.3; ... clsoedir(dir); Signed-off-by: Qian Yingjin <qian@ddn.com> Change-Id: Iac38e33bfc6d7a0b755c2646ba8053a263e3afc9 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48625 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-13306 mgs: use large NIDS in the nid table on the MGS On the MGS the NIDs detected are handled using the struct mgs_target_info which currently only handles lnet_nid_t. This structure also limits the number of NIDs to 32 entries. Some sites have reported that 32 NIDs wasn't enough when they configured virtual LNet networks for isolation. Update the mgs_target_info to use NID strings instead. This has the advantage of working even if struct lnet_nid expands in the future. We place this data at the end of the mgs_target_info as a flexible array. This requires updating the ptlrpc packet handling to increase the size to some new value to contain all the NIDs registered. Also this gives us the option to use hostnames in the future. This information is then feed into a struct mgs_nidtbl_entry which is sent to the mgc on all the remote nodes. With this patch only large NIDs for small address space is translated to the original lnet_nid_t format and sent to the various clients. All the server targets, which are clients of the MGS, use the large NID format. With this patch we don't have to patch old clients when the servers are using the larger NID format. Expand LNetGetId() to return large NID addresses as well. In the future we will use the ocd_connect_flags to determine if the MSG supports large NID addresses. Change-Id: I7083d6ecfc46cf0419a0d4a582e4bf5240f193cd Signed-off-by: James Simmons <jsimmons@infradead.org> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50896 Tested-by: Maloo <maloo@whamcloud.com> Tested-by: jenkins <devops@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Neil Brown <neilb@suse.de> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-15535 llite: deadlock on lli_lsm_sem it may happen that one process is doing lookup, and after reply while holding the LDLM lock is trying to update LSM/default LSM under the write lli_lsm_sem for a dir. another process has taken the read lli_lsm_sem (taken for all the MD ops in ll_prep_md_op_data()) and is waiting for a conflicting PW LDLM lock on server for its modification for this dir. it may happen on restriping with LSM, on changing the default LSM, but even more often way is racer run even without striped dirs: - racer does LFS mkdir -i $i <subdir> per each MDS, what creates a default LSM on these subdirs inherited endlessly - to keep the MDS index; - racer also does mkdir -p <path>, in which case we do: ll_new_node - create a parent dir, no RMF_DEFAULT_MDT_MD in reply ll_lookup parent it=open - no RMF_DEFAULT_MDT_MD in reply ll_new_node - create a child the default LSM is inherited on the parent creation, however as those RPCs do not have lookup LDLM lock and no data - the default layout is not set for the parent in inode at the time of a child creation. thus a parallel lookup which gets the LSM deadlocks with this ll_new_node(). at the same time, similar to CLIO, we do not need to hold a sem nor an LDLM lock over the whole operation to avoid LSM modification on server, we just need to take an uptodate LSM (this is a subject for LU-16320) and to guarantee this op will be working on the client on this LSM for the whole operation. the solution is to let MD ops to work on a copy of LSM therefore letting others to modify LSM attached to inode in parallel if needed. HPE-bug-id: LUS-10725 Signed-off-by: Vitaly Fertman <vitaly.fertman@hpe.com> Change-Id: I3137300b5bcce2e890994ce8751cdf7fce2f3f54 Reviewed-on: https://es-gerrit.hpc.amslabs.hpecorp.net/161525 Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com> Reviewed-by: Andriy Skulysh <c17819@cray.com> Tested-by: Vitaly Fertman <c17818@cray.com> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50489 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-15535 revert: "LU-15284 llite: access lli_lsm_md with lock in all places" This reverts commit 1dfae156d1dbc11cfb77b2d35cbffb2da7f28137 as a prerequisite of a larger fix in this ticket which covers this problem as well. Signed-off-by: Vitaly Fertman <vitaly.fertman@hpe.com> Change-Id: Ic1b0b6c963ea96e9f51324625deaa851245f8a7d Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50488 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
LU-13343 gss: no sec flavor on loopback connection When using a local client, i.e. a client mounted on a server node, there is no benefit from a security standpoint to enforce an SSK or KRB flavor, since the data does not go over the network. So force the 'null' security flavor for connections on 0@lo, independently of the currently defined srpc flavor. Signed-off-by: Sebastien Buisson <sbuisson@ddn.com> Change-Id: If25d69bb1e67735cb0544ca954e49175f7471248 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/46704 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Aurelien Degremont <adegremont@nvidia.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16634 misc: replace obsolete ioctl numbers Renumber the OBD_IOC_BARRIER and IOC_OSC_SET_ACTIVE ioctl numbers to use IOC type 'f' instead of 'g' and 'h', respectively. Add compatibility code to handle their deprecation in the future. Move already-deprecated ioctls OBD_IOC_GETNAME_OLD, OBD_GET_VERSION, IOC_LIBCFS_GET_NI, and IOC_LIBCFS_PING to lustre_ioctl_old.h also. Remove other already obsolete ioctl number definitions. Add new llapi_ioctl() and llapi_ioctl_dev() helper functions to handle fallback of ioctl commands to older versions when needed. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Change-Id: I519f23d34ce6197f3430a3825c5190cedb00cf14 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50390 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com> Reviewed-by: Vitaliy Kuznetsov <vkuznetsov@ddn.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>