From 7d4aed1ea408f45aef8ddf5f28d8c10680b4f214 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 29 Jan 2020 13:05:04 -0500 Subject: [PATCH] bcachefs: Fix an uninitialized field in bch_write_op Regression from "bcachefs: Track incompressible data" Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- fs/bcachefs/io.h | 1 + fs/bcachefs/io_types.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/bcachefs/io.h b/fs/bcachefs/io.h index fa5841a86fcb..bc9f9fec2fd7 100644 --- a/fs/bcachefs/io.h +++ b/fs/bcachefs/io.h @@ -82,6 +82,7 @@ static inline void bch2_write_op_init(struct bch_write_op *op, struct bch_fs *c, op->nr_replicas = 0; op->nr_replicas_required = c->opts.data_replicas_required; op->alloc_reserve = RESERVE_NONE; + op->incompressible = 0; op->open_buckets.nr = 0; op->devs_have.nr = 0; op->target = 0; diff --git a/fs/bcachefs/io_types.h b/fs/bcachefs/io_types.h index a9a336c04269..692af6dd6031 100644 --- a/fs/bcachefs/io_types.h +++ b/fs/bcachefs/io_types.h @@ -106,7 +106,7 @@ struct bch_write_op { unsigned compression_type:4; unsigned nr_replicas:4; unsigned nr_replicas_required:4; - unsigned alloc_reserve:4; + unsigned alloc_reserve:3; unsigned incompressible:1; struct bch_devs_list devs_have;