lsm_fs_clone(3)
π lsm_fs_clone β bestie, we're cloning a filesystem π
okay so this is a page from the Libstoragemgmt C API Manual, section 3, and the function is called lsm_fs_clone. It's giving "duplicate my filesystem but make it β¨efficientβ¨". Let's get into it.
β¨ NAME β¨
lsm_fs_clone β Clones an existing file system. That's it, that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
int lsm_fs_clone (lsm_connect *conn, lsm_fs *src_fs, const char *name,
lsm_fs_ss *optional_ss, lsm_fs **cloned_fs, char **job, lsm_flag flags);
π ARGUMENTS π
connβ a valid connection, bestie. Gotta have one. Valid connection.src_fsβ pointer oflsm_fsfor the source file system. Like, the original. The blueprint. The main character we're copying. πnameβ a string. Human recognizable name for the new file system β but heads up, it might be altered or ignored by certain storage system. So don't get too attached to your naming skills, some storage systems just do their own thing. πoptional_ssβ pointer oflsm_fs_ss. This is the file system snapshot to base the clone from. Set toNULLof not needed.. (yes that typo is canon, we don't fix what we don't own π)cloned_fsβ output pointer oflsm_fsfor the newlly created file system. Will beNULLif the storage system support asynchronous action on this. The returned value must be freed with a call tolsm_fs_record_free. Don't forget, or that's a memory leak and we don't do those. π«Άjobβ output pointer of string. If the storage system support asynchronous action on this, a job will be created and could be tracked vialsm_job_status_fs_get. It'sNULLif the storage system does not support asynchronous action on this.flagsβ Reserved for future use, must beLSM_CLIENT_FLAG_RSVD. No freelancing with the flags, bestie. π
β VERSION β
1.0 β iconic from day one, honestly.
π¦ DESCRIPTION π¦
Create a point in time read writeable space efficient copy of the specified file system β also know as a read writeable snapshot. The new file system will reside in the same pool of the specified file system. Same pool, same energy, different filesystem. periodt. π
π₯ CAPABILITY π₯
LSM_CAP_FS_CLONE
π RETURN π
Error code as enumerated by lsm_error_number. Let's go through them:
LSM_ERR_OK- On success. slay. β¨
LSM_ERR_JOB_STARTED- A job is started. Please check the
joboutput pointer. π
- A job is started. Please check the
LSM_ERR_INVALID_ARGUMENT- When any argument is
NULLor not a validlsm_connectpointer or invalid flags. So like, don't do that.
- When any argument is
LSM_ERR_NOT_FOUND_FS- When file system not found. she's not here. π
LSM_ERR_NOT_ENOUGH_SPACE- Pool does not have enough space. The pool said no. π
LSM_ERR_POOL_NOT_READY- Pool is not ready. Give her a minute. π§
LSM_ERR_NO_SUPPORT- Not supported. Not every storage system woke up and chose functionality, iykyk. π
π SIGN-OFF π
This page lives under the Libstoragemgmt C API Manual, dated February 2026, and it's filed as lsm_fs_clone(3). Go clone something responsibly, bestie. mwah. ππ
π¦ where this page comes from
- fedora 43: libstoragemgmt-devel 1.10.3-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: libstoragemgmt-devel 1.10.3-1.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms