1lsm_volume_cache_info(3) Libstoragemgmt C API Manual lsm_volume_cache_info(3)
2
3
4
6 lsm_volume_cache_info - Query RAM cache information for the specified
7 volume.
8
10 int lsm_volume_cache_info (lsm_connect *conn, lsm_volume *volume,
11 uint32_t *write_cache_policy, uint32_t *write_cache_status, uint32_t
12 *read_cache_policy, uint32_t *read_cache_status, uint32_t *physi‐
13 cal_disk_cache, lsm_flag flags);
14
16 conn Valid connection.
17
18 volume Pointer of lsm_volume.
19
20 write_cache_policy
21 uint32_t. The write cache policy. Valid values are: *
22 LSM_VOLUME_WRITE_CACHE_POLICY_WRITE_BACK
23 The storage system will use write back mode if cache
24 hardware
25 found. * LSM_VOLUME_WRITE_CACHE_POLICY_AUTO
26 The controller will use write back mode when bat‐
27 tery/capacitor
28 is in good health, otherwise, write through mode. *
29 LSM_VOLUME_WRITE_CACHE_POLICY_WRITE_THROUGH
30 The storage system will use write through mode. *
31 LSM_VOLUME_WRITE_CACHE_POLICY_UNKNOWN
32 Plugin failed to detect this setting.
33
34 write_cache_status
35 uint32_t. The status of write cache. Valid values are: *
36 LSM_VOLUME_WRITE_CACHE_STATUS_WRITE_THROUGH * LSM_VOL‐
37 UME_WRITE_CACHE_STATUS_WRITE_BACK * LSM_VOL‐
38 UME_WRITE_CACHE_STATUS_UNKNOWN
39
40 read_cache_policy
41 uint32_t. The policy for read cache. Valid values are: *
42 LSM_VOLUME_READ_CACHE_POLICY_ENABLED
43 Read cache is enabled, when reading I/O on previous
44 unchanged
45 written I/O or read I/O in cache will be returned to I/O
46 initiator immediately without checking backing
47 store(normally
48 disk). * LSM_VOLUME_READ_CACHE_POLICY_DISABLED
49 Read cache is disabled. * LSM_VOLUME_READ_CACHE_POL‐
50 ICY_UNKNOWN
51 Plugin failed to detect the read cache policy.
52
53 read_cache_status
54 uint32_t. The status of read cache. Valid values are: *
55 LSM_VOLUME_READ_CACHE_STATUS_ENABLED * LSM_VOL‐
56 UME_READ_CACHE_STATUS_DISABLED * LSM_VOLUME_READ_CACHE_STA‐
57 TUS_UNKNOWN
58
59 physical_disk_cache
60 Whether physical disk's cache is enabled or not. Please be
61 advised, HDD's physical disk ram cache might not be pro‐
62 tected by storage system's battery or capacitor on sudden
63 power loss, you could lose data if a power failure occurs
64 during a write process. For SSD's physical disk cache,
65 please check with the vendor of your hardware RAID card and
66 SSD disk. Valid values are: * LSM_VOLUME_PHYSI‐
67 CAL_DISK_CACHE_ENABLED
68 Physical disk cache enabled. * LSM_VOLUME_PHYSI‐
69 CAL_DISK_CACHE_DISABLED
70 Physical disk cache disabled. * LSM_VOLUME_PHYSI‐
71 CAL_DISK_CACHE_USE_DISK_SETTING
72 Physical disk cache is determined by the disk vendor
73 via
74 physical disks' SCSI caching mode page(0x08 page). It
75 is
76 strongly suggested to change this value to
77 LSM_VOLUME_PHYSICAL_DISK_CACHE_ENABLED or
78 LSM_VOLUME_PHYSICAL_DISK_CACHE_DISABLED * LSM_VOL‐
79 UME_PHYSICAL_DISK_CACHE_UNKNOWN
80 Plugin failed to detect the physical disk status.
81
82 flags Reserved for future use, must be LSM_CLIENT_FLAG_RSVD.
83
85 1.3.
86
88 Query RAM cache settings for the specified volume.
89
91 LSM_CAP_VOLUME_CACHE_INFO
92
94 Error code as enumerated by 'lsm_error_number'.
95 * LSM_ERR_OK
96 On success.
97 * LSM_ERR_NOT_FOUND_VOLUME
98 When volume not found.
99 * LSM_ERR_INVALID_ARGUMENT
100 When any argument is NULL or invalid flags.
101 * LSM_ERR_NO_SUPPORT
102 Not supported.
103
104
105
106April 2019 lsm_volume_cache_info lsm_volume_cache_info(3)