mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-28 19:06:42 -05:00
Store UUIDs in the disk element
This commit is contained in:
parent
c80fd07058
commit
801d01c55b
3 changed files with 32 additions and 24 deletions
|
|
@ -31,6 +31,11 @@
|
|||
/****************************************************************************/
|
||||
/* snapraid */
|
||||
|
||||
/**
|
||||
* Max UUID length.
|
||||
*/
|
||||
#define UUID_MAX 128
|
||||
|
||||
/**
|
||||
* Invalid position.
|
||||
*/
|
||||
|
|
@ -320,6 +325,8 @@ struct snapraid_disk {
|
|||
char name[PATH_MAX]; /**< Name of the disk. */
|
||||
char dir[PATH_MAX]; /**< Mount point of the disk. It always terminates with /. */
|
||||
char smartctl[PATH_MAX]; /**< Custom command for smartctl. Empty means auto. */
|
||||
char uuid[UUID_MAX]; /**< UUID of the disk. */
|
||||
|
||||
uint64_t device; /**< Device identifier. */
|
||||
uint64_t tick; /**< Usage time of the disk. */
|
||||
block_off_t total_blocks; /**< Number of total blocks. */
|
||||
|
|
@ -378,11 +385,6 @@ struct snapraid_disk {
|
|||
tommy_node node;
|
||||
};
|
||||
|
||||
/**
|
||||
* Max UUID length.
|
||||
*/
|
||||
#define UUID_MAX 128
|
||||
|
||||
/**
|
||||
* Disk mapping.
|
||||
*/
|
||||
|
|
@ -866,7 +868,7 @@ static inline tommy_uint32_t dir_name_hash(const char* name)
|
|||
/**
|
||||
* Allocate a disk.
|
||||
*/
|
||||
struct snapraid_disk* disk_alloc(const char* name, const char* dir, uint64_t dev, int skip);
|
||||
struct snapraid_disk* disk_alloc(const char* name, const char* dir, uint64_t dev, const char* uuid, int skip);
|
||||
|
||||
/**
|
||||
* Deallocate a disk.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue