diff options
author | David Sterba <dsterba@suse.com> | 2021-06-18 14:57:05 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-06-22 14:11:58 +0200 |
commit | ccd9395b5241310f1ef518ad371f8de779f0b681 (patch) | |
tree | 1a5b73154ad814e5c871122a881ce7dd93fc53ce /fs/unicode | |
parent | 5548c8c6f55bf0097075b3720e14857e3272429f (diff) | |
download | lwn-ccd9395b5241310f1ef518ad371f8de779f0b681.tar.gz lwn-ccd9395b5241310f1ef518ad371f8de779f0b681.zip |
btrfs: switch mount option bits to enums and use wider type
Switch defines of BTRFS_MOUNT_* to an enum (the symbolic names are
recorded in the debugging information for convenience).
There are two more things done but separating them would not make much
sense as it's touching the same lines:
- Renumber shifts 18..31 to 17..30 to get rid of the hole in the
sequence.
- Use 1UL as the value that gets shifted because we're approaching the
32bit limit and due to integer promotions the value of (1 << 31)
becomes 0xffffffff80000000 when cast to unsigned long (eg. the option
manipulating helpers).
This is not causing any problems yet as the operations are in-memory
and masking the 31st bit works, we don't have more than 31 bits so the
ill effects of not masking higher bits don't happen. But once we have
more, the problems will emerge.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/unicode')
0 files changed, 0 insertions, 0 deletions