mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
bcachefs: Don't log errors that are expected during shutdown
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
24e0c3f8da
commit
a7b46a3db0
@ -1222,7 +1222,8 @@ void bch2_write(struct closure *cl)
|
||||
|
||||
if (c->opts.nochanges ||
|
||||
!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;
|
||||
goto err;
|
||||
}
|
||||
|
@ -35,10 +35,11 @@ enum bch_write_flags {
|
||||
BCH_WRITE_ONLY_SPECIFIED_DEVS = (1 << 6),
|
||||
BCH_WRITE_NOPUT_RESERVATION = (1 << 7),
|
||||
BCH_WRITE_WROTE_DATA_INLINE = (1 << 8),
|
||||
BCH_WRITE_FROM_INTERNAL = (1 << 9),
|
||||
|
||||
/* Internal: */
|
||||
BCH_WRITE_JOURNAL_SEQ_PTR = (1 << 9),
|
||||
BCH_WRITE_SKIP_CLOSURE_PUT = (1 << 10),
|
||||
BCH_WRITE_JOURNAL_SEQ_PTR = (1 << 10),
|
||||
BCH_WRITE_SKIP_CLOSURE_PUT = (1 << 11),
|
||||
};
|
||||
|
||||
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,
|
||||
m->op.flags |= BCH_WRITE_ONLY_SPECIFIED_DEVS|
|
||||
BCH_WRITE_PAGES_STABLE|
|
||||
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_required = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user