• Home
  • Raw
  • Download

Lines Matching +full:display +full:- +full:hint

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2012-2013 Samsung Electronics Co., Ltd.
68 #define MAX_CHARSET_SIZE 6 /* max size of multi-byte character */
75 #define EXFAT_HINT_NONE -1
81 #define EXFAT_CLU_TO_B(b, sbi) ((b) << (sbi)->cluster_size_bits)
82 #define EXFAT_B_TO_CLU(b, sbi) ((b) >> (sbi)->cluster_size_bits)
84 (((b - 1) >> (sbi)->cluster_size_bits) + 1)
85 #define EXFAT_CLU_OFFSET(off, sbi) ((off) & ((sbi)->cluster_size - 1))
90 #define EXFAT_BLK_TO_B(b, sb) ((b) << (sb)->s_blocksize_bits)
91 #define EXFAT_B_TO_BLK(b, sb) ((b) >> (sb)->s_blocksize_bits)
93 (((b - 1) >> (sb)->s_blocksize_bits) + 1)
94 #define EXFAT_BLK_OFFSET(off, sb) ((off) & ((sb)->s_blocksize - 1))
100 ((b) << ((sbi)->cluster_size_bits - DENTRY_SIZE_BITS))
109 #define FAT_ENT_OFFSET_SECTOR(sb, loc) (EXFAT_SB(sb)->FAT1_start_sector + \
110 (((u64)loc << FAT_ENT_SIZE_BITS) >> sb->s_blocksize_bits))
112 ((loc << FAT_ENT_SIZE_BITS) & (sb->s_blocksize - 1))
117 #define CLUSTER_TO_BITMAP_ENT(clu) ((clu) - EXFAT_RESERVED_CLUSTERS)
119 #define BITS_PER_SECTOR(sb) ((sb)->s_blocksize * BITS_PER_BYTE)
120 #define BITS_PER_SECTOR_MASK(sb) (BITS_PER_SECTOR(sb) - 1)
122 ((ent / BITS_PER_BYTE) >> (sb)->s_blocksize_bits)
125 ((ent / BITS_PER_BYTE) & ((sb)->s_blocksize - 1))
127 #define IGNORED_BITS_REMAINED(clu, clu_base) ((1 << ((clu) - (clu_base))) - 1)
149 /* first empty entry hint information */
159 /* hint structure */
178 #define IS_DYNAMIC_ES(es) ((es)->__bh != (es)->bh)
196 * exfat mount in-memory data
205 /* charset for filename input/display */
207 /* on error: continue, panic, remount-ro */
209 unsigned utf8:1, /* Use of UTF-8 character set */
215 * EXFAT file system superblock in-memory data
245 struct nls_table *nls_io; /* Charset used for input and display */
257 * EXFAT file system inode in-memory data
272 /* hint for cluster last accessed */
274 /* hint for entry index we try to lookup next time */
276 /* hint for first empty entry */
286 * NOTE: i_size_ondisk is 64bits, so must hold ->inode_lock to access.
290 /* block-aligned i_size (used in cont_write_begin) */
292 /* on-disk position of directory entry or 0 */
305 return sb->s_fs_info; in EXFAT_SB()
314 * If ->i_mode can't hold 0222 (i.e. ATTR_RO), we use ->i_attrs to
315 * save ATTR_RO instead of ->i_mode.
317 * If it's directory and !sbi->options.rodir, ATTR_RO isn't read-only
322 struct exfat_sb_info *sbi = EXFAT_SB(inode->i_sb); in exfat_mode_can_hold_ro()
324 if (S_ISDIR(inode->i_mode)) in exfat_mode_can_hold_ro()
327 if ((~sbi->options.fs_fmask) & 0222) in exfat_mode_can_hold_ro()
340 return (mode & ~sbi->options.fs_dmask) | S_IFDIR; in exfat_make_mode()
342 return (mode & ~sbi->options.fs_fmask) | S_IFREG; in exfat_make_mode()
348 unsigned short attr = EXFAT_I(inode)->attr; in exfat_make_attr()
350 if (S_ISDIR(inode->i_mode)) in exfat_make_attr()
352 if (exfat_mode_can_hold_ro(inode) && !(inode->i_mode & 0222)) in exfat_make_attr()
360 EXFAT_I(inode)->attr = attr & (ATTR_RWMASK | ATTR_READONLY); in exfat_save_attr()
362 EXFAT_I(inode)->attr = attr & ATTR_RWMASK; in exfat_save_attr()
368 return ((sec - sbi->data_start_sector + 1) & in exfat_is_last_sector_in_cluster()
369 ((1 << sbi->sect_per_clus_bits) - 1)) == 0; in exfat_is_last_sector_in_cluster()
375 return ((sector_t)(clus - EXFAT_RESERVED_CLUSTERS) << sbi->sect_per_clus_bits) + in exfat_cluster_to_sector()
376 sbi->data_start_sector; in exfat_cluster_to_sector()
382 return ((sec - sbi->data_start_sector) >> sbi->sect_per_clus_bits) + in exfat_sector_to_cluster()
389 if (clus < EXFAT_FIRST_CLUSTER || sbi->num_clusters <= clus) in is_valid_cluster()
509 __exfat_fs_error(sb, __ratelimit(&EXFAT_SB(sb)->ratelimit), \