Loading fs/bcachefs/btree_iter.c +1 −1 Original line number Diff line number Diff line Loading @@ -257,7 +257,7 @@ static void bch2_btree_iter_verify(struct btree_iter *iter) BUG_ON(!(iter->flags & __BTREE_ITER_ALL_SNAPSHOTS) && (iter->flags & BTREE_ITER_ALL_SNAPSHOTS) && !btree_type_has_snapshots(iter->btree_id)); !btree_type_has_snapshot_field(iter->btree_id)); if (iter->update_path) bch2_btree_path_verify(trans, iter->update_path); Loading fs/bcachefs/btree_iter.h +1 −2 Original line number Diff line number Diff line Loading @@ -416,8 +416,7 @@ static inline unsigned __bch2_btree_iter_flags(struct btree_trans *trans, flags |= BTREE_ITER_IS_EXTENTS; if (!(flags & __BTREE_ITER_ALL_SNAPSHOTS) && !btree_type_has_snapshot_field(btree_id) && !btree_type_has_snapshots(btree_id)) !btree_type_has_snapshot_field(btree_id)) flags &= ~BTREE_ITER_ALL_SNAPSHOTS; if (!(flags & BTREE_ITER_ALL_SNAPSHOTS) && Loading fs/bcachefs/btree_types.h +1 −1 Original line number Diff line number Diff line Loading @@ -713,7 +713,7 @@ static inline bool btree_type_has_snapshots(enum btree_id id) static inline bool btree_type_has_snapshot_field(enum btree_id id) { const unsigned mask = 0 #define x(name, nr, flags, ...) |((!!((flags) & BTREE_ID_SNAPSHOT_FIELD)) << nr) #define x(name, nr, flags, ...) |((!!((flags) & (BTREE_ID_SNAPSHOT_FIELD|BTREE_ID_SNAPSHOTS))) << nr) BCH_BTREE_IDS() #undef x ; Loading fs/bcachefs/io_write.c +11 −0 Original line number Diff line number Diff line Loading @@ -202,6 +202,17 @@ static inline int bch2_extent_update_i_size_sectors(struct btree_trans *trans, struct btree_iter iter; struct bkey_i *k; struct bkey_i_inode_v3 *inode; /* * Crazy performance optimization: * Every extent update needs to also update the inode: the inode trigger * will set bi->journal_seq to the journal sequence number of this * transaction - for fsync. * * But if that's the only reason we're updating the inode (we're not * updating bi_size or bi_sectors), then we don't need the inode update * to be journalled - if we crash, the bi_journal_seq update will be * lost, but that's fine. */ unsigned inode_update_flags = BTREE_UPDATE_NOJOURNAL; int ret; Loading Loading
fs/bcachefs/btree_iter.c +1 −1 Original line number Diff line number Diff line Loading @@ -257,7 +257,7 @@ static void bch2_btree_iter_verify(struct btree_iter *iter) BUG_ON(!(iter->flags & __BTREE_ITER_ALL_SNAPSHOTS) && (iter->flags & BTREE_ITER_ALL_SNAPSHOTS) && !btree_type_has_snapshots(iter->btree_id)); !btree_type_has_snapshot_field(iter->btree_id)); if (iter->update_path) bch2_btree_path_verify(trans, iter->update_path); Loading
fs/bcachefs/btree_iter.h +1 −2 Original line number Diff line number Diff line Loading @@ -416,8 +416,7 @@ static inline unsigned __bch2_btree_iter_flags(struct btree_trans *trans, flags |= BTREE_ITER_IS_EXTENTS; if (!(flags & __BTREE_ITER_ALL_SNAPSHOTS) && !btree_type_has_snapshot_field(btree_id) && !btree_type_has_snapshots(btree_id)) !btree_type_has_snapshot_field(btree_id)) flags &= ~BTREE_ITER_ALL_SNAPSHOTS; if (!(flags & BTREE_ITER_ALL_SNAPSHOTS) && Loading
fs/bcachefs/btree_types.h +1 −1 Original line number Diff line number Diff line Loading @@ -713,7 +713,7 @@ static inline bool btree_type_has_snapshots(enum btree_id id) static inline bool btree_type_has_snapshot_field(enum btree_id id) { const unsigned mask = 0 #define x(name, nr, flags, ...) |((!!((flags) & BTREE_ID_SNAPSHOT_FIELD)) << nr) #define x(name, nr, flags, ...) |((!!((flags) & (BTREE_ID_SNAPSHOT_FIELD|BTREE_ID_SNAPSHOTS))) << nr) BCH_BTREE_IDS() #undef x ; Loading
fs/bcachefs/io_write.c +11 −0 Original line number Diff line number Diff line Loading @@ -202,6 +202,17 @@ static inline int bch2_extent_update_i_size_sectors(struct btree_trans *trans, struct btree_iter iter; struct bkey_i *k; struct bkey_i_inode_v3 *inode; /* * Crazy performance optimization: * Every extent update needs to also update the inode: the inode trigger * will set bi->journal_seq to the journal sequence number of this * transaction - for fsync. * * But if that's the only reason we're updating the inode (we're not * updating bi_size or bi_sectors), then we don't need the inode update * to be journalled - if we crash, the bi_journal_seq update will be * lost, but that's fine. */ unsigned inode_update_flags = BTREE_UPDATE_NOJOURNAL; int ret; Loading