PMEMBLK_SET_ERROR(3)
π PMEMBLK_SET_ERROR(3) π
okay bestie, welcome to the PMDK Programmer's Manual β¨ this one's a lil bittersweet because it's giving retro, but we still gotta know it, so let's go π«Ά
πΈ NAME πΈ
pmemblk_set_zero() (DEPRECATED), pmemblk_set_error() (DEPRECATED) β block management functions π
β¨ SYNOPSIS β¨
#include <libpmemblk.h>
int pmemblk_set_zero(PMEMblkpool *pbp, long long blockno);
int pmemblk_set_error(PMEMblkpool *pbp, long long blockno);
π¦ DESCRIPTION π¦
so pmemblk_set_zero() writes zeros to block number blockno in the persistent memory resident array of blocks pbp β¨ and here's the slay part β using this function is faster than actually writing a block of zeros, because libpmemblk(7) uses metadata to indicate that the block should read back as zero. it's giving efficiency, it's giving icon, no cap π
then pmemblk_set_error() sets the error state for block number blockno in the persistent memory resident array of blocks pbp. a block in the error state returns errno EIO when read π. but bestie, it's not forever β writing the block clears the error state and returns the block to normal use π«Άβ¨
β RETURN VALUE β
on success, pmemblk_set_zero() and pmemblk_set_error() return 0 π
on error, they return -1 and set errno appropriately π (yes, check it, always check it, i'm literally begging)
π SEE ALSO π
libpmemblk(7) and <https://pmem.io> π
β οΈ heads up queen: both of these are marked DEPRECATED in the original, so don't be out here building your whole main character arc on them, okay? just know them, that's the vibe π
that's the whole page, bestie!! mwah π this lil gem came to you courtesy of the PMDK Programmer's Manual, dated 2023-05-31 β yes, that's the source, version, and date all in one cute lil bow π byeee, go write some blocks (or don't, it's deprecated) πΈβ¨
π¦ where this page comes from
- debian trixie: libpmemblk-dev 1.13.1-1.1+b1 Β· BSD-3-Clause
- ubuntu noble: libpmemblk-dev 1.13.1-1.1ubuntu2 Β· BSD-3-Clause
- ubuntu questing: libpmemblk-dev 1.13.1-1.1ubuntu3
- ubuntu resolute: libpmemblk-dev 1.13.1-1.1ubuntu4 Β· BSD-3-Clause
- ubuntu stonking: libpmemblk-dev 1.13.1-1.1ubuntu5 Β· BSD-3-Clause
- π the page's license: BSD-3-Clause
- Copyright 2017-2023, Intel Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms