Commit a7b46a3d authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Don't log errors that are expected during shutdown

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 24e0c3f8
...@@ -1222,7 +1222,8 @@ void bch2_write(struct closure *cl) ...@@ -1222,7 +1222,8 @@ void bch2_write(struct closure *cl)
if (c->opts.nochanges || if (c->opts.nochanges ||
!percpu_ref_tryget(&c->writes)) { !percpu_ref_tryget(&c->writes)) {
__bcache_io_error(c, "read only"); if (!(op->flags & BCH_WRITE_FROM_INTERNAL))
__bcache_io_error(c, "read only");
op->error = -EROFS; op->error = -EROFS;
goto err; goto err;
} }
......
...@@ -35,10 +35,11 @@ enum bch_write_flags { ...@@ -35,10 +35,11 @@ enum bch_write_flags {
BCH_WRITE_ONLY_SPECIFIED_DEVS = (1 << 6), BCH_WRITE_ONLY_SPECIFIED_DEVS = (1 << 6),
BCH_WRITE_NOPUT_RESERVATION = (1 << 7), BCH_WRITE_NOPUT_RESERVATION = (1 << 7),
BCH_WRITE_WROTE_DATA_INLINE = (1 << 8), BCH_WRITE_WROTE_DATA_INLINE = (1 << 8),
BCH_WRITE_FROM_INTERNAL = (1 << 9),
/* Internal: */ /* Internal: */
BCH_WRITE_JOURNAL_SEQ_PTR = (1 << 9), BCH_WRITE_JOURNAL_SEQ_PTR = (1 << 10),
BCH_WRITE_SKIP_CLOSURE_PUT = (1 << 10), BCH_WRITE_SKIP_CLOSURE_PUT = (1 << 11),
}; };
static inline u64 *op_journal_seq(struct bch_write_op *op) static inline u64 *op_journal_seq(struct bch_write_op *op)
......
...@@ -242,7 +242,8 @@ int bch2_migrate_write_init(struct bch_fs *c, struct migrate_write *m, ...@@ -242,7 +242,8 @@ int bch2_migrate_write_init(struct bch_fs *c, struct migrate_write *m,
m->op.flags |= BCH_WRITE_ONLY_SPECIFIED_DEVS| m->op.flags |= BCH_WRITE_ONLY_SPECIFIED_DEVS|
BCH_WRITE_PAGES_STABLE| BCH_WRITE_PAGES_STABLE|
BCH_WRITE_PAGES_OWNED| BCH_WRITE_PAGES_OWNED|
BCH_WRITE_DATA_ENCODED; BCH_WRITE_DATA_ENCODED|
BCH_WRITE_FROM_INTERNAL;
m->op.nr_replicas = 1; m->op.nr_replicas = 1;
m->op.nr_replicas_required = 1; m->op.nr_replicas_required = 1;
......
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