]>
Commit | Line | Data |
---|---|---|
959ef981 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
a555a1f4 DW |
2 | /* |
3 | * Copyright (C) 2018 Oracle. All Rights Reserved. | |
a555a1f4 | 4 | * Author: Darrick J. Wong <darrick.wong@oracle.com> |
a555a1f4 DW |
5 | */ |
6 | #ifndef XFS_SCRUB_DISK_H_ | |
7 | #define XFS_SCRUB_DISK_H_ | |
8 | ||
03c0cd8f | 9 | #define DISK_FLAG_SCSI_VERIFY 0x1 |
a555a1f4 DW |
10 | struct disk { |
11 | struct stat d_sb; | |
12 | int d_fd; | |
13 | int d_lbalog; | |
14 | unsigned int d_flags; | |
15 | unsigned int d_blksize; /* bytes */ | |
16 | uint64_t d_size; /* bytes */ | |
17 | uint64_t d_start; /* bytes */ | |
18 | }; | |
19 | ||
20 | unsigned int disk_heads(struct disk *disk); | |
21 | struct disk *disk_open(const char *pathname); | |
22 | int disk_close(struct disk *disk); | |
23 | ssize_t disk_read_verify(struct disk *disk, void *buf, uint64_t startblock, | |
24 | uint64_t blockcount); | |
25 | ||
26 | #endif /* XFS_SCRUB_DISK_H_ */ |