diff options
author | John Sanpe <sanpeqf@gmail.com> | 2023-12-08 07:47:01 +0800 |
---|---|---|
committer | Namjae Jeon <linkinjeon@kernel.org> | 2024-01-08 21:57:21 +0900 |
commit | 34939ae005ec402ee183956114b1a74cb57b8b9d (patch) | |
tree | ff6d23f2e041f78a8d3f4e4b0af0c19212ffcc80 /fs/exfat/exfat_fs.h | |
parent | 7423546040194e0e74fcfedd089a8b2720fcfc6e (diff) |
exfat: using ffs instead of internal logic
Replaced the internal table lookup algorithm with ffs of
the bitops library with better performance.
Use it to increase the single processing length of the
exfat_find_free_bitmap function, from single-byte search to long type.
Signed-off-by: John Sanpe <sanpeqf@gmail.com>
Acked-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'fs/exfat/exfat_fs.h')
-rw-r--r-- | fs/exfat/exfat_fs.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h index a7a2c35d74fb..8030780a199b 100644 --- a/fs/exfat/exfat_fs.h +++ b/fs/exfat/exfat_fs.h @@ -135,8 +135,7 @@ enum { #define BITMAP_OFFSET_BIT_IN_SECTOR(sb, ent) (ent & BITS_PER_SECTOR_MASK(sb)) #define BITMAP_OFFSET_BYTE_IN_SECTOR(sb, ent) \ ((ent / BITS_PER_BYTE) & ((sb)->s_blocksize - 1)) -#define BITS_PER_BYTE_MASK 0x7 -#define IGNORED_BITS_REMAINED(clu, clu_base) ((1 << ((clu) - (clu_base))) - 1) +#define IGNORED_BITS_REMAINED(clu, clu_base) ((1UL << ((clu) - (clu_base))) - 1) #define ES_ENTRY_NUM(name_len) (ES_IDX_LAST_FILENAME(name_len) + 1) /* 19 entries = 1 file entry + 1 stream entry + 17 filename entries */ |