summaryrefslogtreecommitdiff
path: root/libbcachefs/inode.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-04-28 12:50:37 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-04-28 12:50:37 -0400
commit0589d9f3c3cdff28a13f9efc96762d39ef615d22 (patch)
tree4d7e466a10ba9cd10c8b30e7aad1606e44770314 /libbcachefs/inode.h
parente00e83b84d8de5a6fa279a3c50ad1d7603ee4607 (diff)
Update bcachefs sources to 6e73711dc355 bcachefs: Read retries are after checksum errors now REQ_FUA
Diffstat (limited to 'libbcachefs/inode.h')
-rw-r--r--libbcachefs/inode.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbcachefs/inode.h b/libbcachefs/inode.h
index 1b2fc902..bb31e953 100644
--- a/libbcachefs/inode.h
+++ b/libbcachefs/inode.h
@@ -243,6 +243,14 @@ static inline unsigned bkey_inode_mode(struct bkey_s_c k)
}
}
+static inline bool bch2_inode_casefold(struct bch_fs *c, const struct bch_inode_unpacked *bi)
+{
+ /* inode apts are stored with a +1 bias: 0 means "unset, use fs opt" */
+ return bi->bi_casefold
+ ? bi->bi_casefold - 1
+ : c->opts.casefold;
+}
+
/* i_nlink: */
static inline unsigned nlink_bias(umode_t mode)