1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2020 Hyunchul Lee <hyc.lee@gmail.com>
13 struct exfat_inode *parent;
14 struct list_head children;
15 struct list_head sibling;
16 struct list_head list;
23 off_t dentry_file_offset;
24 __le16 name[0]; /* only for directory */
27 #define EXFAT_NAME_MAX 255
28 #define NAME_BUFFER_SIZE ((EXFAT_NAME_MAX+1)*2)
30 struct exfat_de_iter {
32 struct exfat_inode *parent;
33 unsigned char *dentries; /* cluster * 2 allocated */
34 unsigned int read_size; /* cluster size */
35 off_t de_file_offset; /* offset in dentries buffer */
36 off_t next_read_offset;
37 int max_skip_dentries;
40 enum fsck_ui_options {
41 FSCK_OPTS_REPAIR_ASK = 0x01,
42 FSCK_OPTS_REPAIR_YES = 0x02,
43 FSCK_OPTS_REPAIR_NO = 0x04,
44 FSCK_OPTS_REPAIR = 0x07,
48 enum fsck_ui_options options;
49 struct exfat_blk_dev *blk_dev;
51 char volume_label[VOLUME_LABEL_BUFFER_SIZE];
52 struct exfat_inode *root;
53 struct list_head dir_list;
54 struct exfat_de_iter de_iter;
59 #define EXFAT_CLUSTER_SIZE(pbr) (1 << ((pbr)->bsx.sect_size_bits + \
60 (pbr)->bsx.sect_per_clus_bits))
61 #define EXFAT_SECTOR_SIZE(pbr) (1 << (pbr)->bsx.sect_size_bits)