.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * zpool memory storage api |
---|
3 | 4 | * |
---|
.. | .. |
---|
238 | 239 | } |
---|
239 | 240 | |
---|
240 | 241 | /** |
---|
| 242 | + * zpool_malloc_support_movable() - Check if the zpool supports |
---|
| 243 | + * allocating movable memory |
---|
| 244 | + * @zpool: The zpool to check |
---|
| 245 | + * |
---|
| 246 | + * This returns if the zpool supports allocating movable memory. |
---|
| 247 | + * |
---|
| 248 | + * Implementations must guarantee this to be thread-safe. |
---|
| 249 | + * |
---|
| 250 | + * Returns: true if the zpool supports allocating movable memory, false if not |
---|
| 251 | + */ |
---|
| 252 | +bool zpool_malloc_support_movable(struct zpool *zpool) |
---|
| 253 | +{ |
---|
| 254 | + return zpool->driver->malloc_support_movable; |
---|
| 255 | +} |
---|
| 256 | + |
---|
| 257 | +/** |
---|
241 | 258 | * zpool_malloc() - Allocate memory |
---|
242 | 259 | * @zpool: The zpool to allocate from. |
---|
243 | 260 | * @size: The amount of memory to allocate. |
---|