Commit d4bce636 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Kill BCH_WRITE_JOURNAL_SEQ_PTR

Dead code, delete.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 2cb75179
...@@ -226,7 +226,7 @@ int bch2_data_update_index_update(struct bch_write_op *op) ...@@ -226,7 +226,7 @@ int bch2_data_update_index_update(struct bch_write_op *op)
bch2_trans_update(&trans, &iter, insert, bch2_trans_update(&trans, &iter, insert,
BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE) ?: BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE) ?:
bch2_trans_commit(&trans, &op->res, bch2_trans_commit(&trans, &op->res,
op_journal_seq(op), &op->journal_seq,
BTREE_INSERT_NOFAIL| BTREE_INSERT_NOFAIL|
m->data_opts.btree_insert_flags); m->data_opts.btree_insert_flags);
if (!ret) { if (!ret) {
......
...@@ -507,7 +507,7 @@ static int bch2_write_index_default(struct bch_write_op *op) ...@@ -507,7 +507,7 @@ static int bch2_write_index_default(struct bch_write_op *op)
BTREE_ITER_SLOTS|BTREE_ITER_INTENT); BTREE_ITER_SLOTS|BTREE_ITER_INTENT);
ret = bch2_extent_update(&trans, inum, &iter, sk.k, ret = bch2_extent_update(&trans, inum, &iter, sk.k,
&op->res, op_journal_seq(op), &op->res, &op->journal_seq,
op->new_i_size, &op->i_sectors_delta, op->new_i_size, &op->i_sectors_delta,
op->flags & BCH_WRITE_CHECK_ENOSPC); op->flags & BCH_WRITE_CHECK_ENOSPC);
bch2_trans_iter_exit(&trans, &iter); bch2_trans_iter_exit(&trans, &iter);
...@@ -776,7 +776,7 @@ void bch2_write_point_do_index_updates(struct work_struct *work) ...@@ -776,7 +776,7 @@ void bch2_write_point_do_index_updates(struct work_struct *work)
__bch2_write(op); __bch2_write(op);
} else if (!op->error && (op->flags & BCH_WRITE_FLUSH)) { } else if (!op->error && (op->flags & BCH_WRITE_FLUSH)) {
bch2_journal_flush_seq_async(&op->c->journal, bch2_journal_flush_seq_async(&op->c->journal,
*op_journal_seq(op), op->journal_seq,
&op->cl); &op->cl);
continue_at(&op->cl, bch2_write_done, index_update_wq(op)); continue_at(&op->cl, bch2_write_done, index_update_wq(op));
} else { } else {
......
...@@ -40,7 +40,6 @@ enum bch_write_flags { ...@@ -40,7 +40,6 @@ enum bch_write_flags {
__BCH_WRITE_FROM_INTERNAL, __BCH_WRITE_FROM_INTERNAL,
__BCH_WRITE_CHECK_ENOSPC, __BCH_WRITE_CHECK_ENOSPC,
__BCH_WRITE_MOVE, __BCH_WRITE_MOVE,
__BCH_WRITE_JOURNAL_SEQ_PTR,
__BCH_WRITE_IN_WORKER, __BCH_WRITE_IN_WORKER,
__BCH_WRITE_DONE, __BCH_WRITE_DONE,
__BCH_WRITE_IO_ERROR, __BCH_WRITE_IO_ERROR,
...@@ -59,17 +58,10 @@ enum bch_write_flags { ...@@ -59,17 +58,10 @@ enum bch_write_flags {
#define BCH_WRITE_MOVE (1U << __BCH_WRITE_MOVE) #define BCH_WRITE_MOVE (1U << __BCH_WRITE_MOVE)
/* Internal: */ /* Internal: */
#define BCH_WRITE_JOURNAL_SEQ_PTR (1U << __BCH_WRITE_JOURNAL_SEQ_PTR)
#define BCH_WRITE_IN_WORKER (1U << __BCH_WRITE_IN_WORKER) #define BCH_WRITE_IN_WORKER (1U << __BCH_WRITE_IN_WORKER)
#define BCH_WRITE_DONE (1U << __BCH_WRITE_DONE) #define BCH_WRITE_DONE (1U << __BCH_WRITE_DONE)
#define BCH_WRITE_IO_ERROR (1U << __BCH_WRITE_IO_ERROR) #define BCH_WRITE_IO_ERROR (1U << __BCH_WRITE_IO_ERROR)
static inline u64 *op_journal_seq(struct bch_write_op *op)
{
return (op->flags & BCH_WRITE_JOURNAL_SEQ_PTR)
? op->journal_seq_p : &op->journal_seq;
}
static inline struct workqueue_struct *index_update_wq(struct bch_write_op *op) static inline struct workqueue_struct *index_update_wq(struct bch_write_op *op)
{ {
return op->alloc_reserve == RESERVE_movinggc return op->alloc_reserve == RESERVE_movinggc
......
...@@ -142,14 +142,7 @@ struct bch_write_op { ...@@ -142,14 +142,7 @@ struct bch_write_op {
struct open_buckets open_buckets; struct open_buckets open_buckets;
/* u64 journal_seq;
* If caller wants to flush but hasn't passed us a journal_seq ptr, we
* still need to stash the journal_seq somewhere:
*/
union {
u64 *journal_seq_p;
u64 journal_seq;
};
u64 new_i_size; u64 new_i_size;
s64 i_sectors_delta; s64 i_sectors_delta;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment