mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
When loop devices are re-used, the disk sequence number is increased. Parse it when creating a loop device and store it. The kernel will never return DISKSEQ=0, so use it to signal that it's not supported by the current kernel.
21 lines
374 B
C
21 lines
374 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
#pragma once
|
|
|
|
#include <linux/fs.h>
|
|
#include <linux/loop.h>
|
|
|
|
#ifndef LOOP_CONFIGURE
|
|
struct loop_config {
|
|
__u32 fd;
|
|
__u32 block_size;
|
|
struct loop_info64 info;
|
|
__u64 __reserved[8];
|
|
};
|
|
|
|
#define LOOP_CONFIGURE 0x4C0A
|
|
#endif
|
|
|
|
#ifndef BLKGETDISKSEQ
|
|
#define BLKGETDISKSEQ _IOR(0x12,128,__u64)
|
|
#endif
|