From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Ming Lei <ming.lei@redhat.com>, Ewan Milne <emilne@redhat.com>
Subject: [PATCH V2 2/4] block: store partition flags into block_device
Date: Wed, 24 Feb 2021 11:58:28 +0800 [thread overview]
Message-ID: <20210224035830.990123-3-ming.lei@redhat.com> (raw)
In-Reply-To: <20210224035830.990123-1-ming.lei@redhat.com>
Prepare for checking if partition is changed.
Cc: Ewan Milne <emilne@redhat.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
block/partitions/core.c | 1 +
include/linux/blk_types.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/block/partitions/core.c b/block/partitions/core.c
index 430ff7863556..07981f663f66 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -352,6 +352,7 @@ static struct block_device *add_partition(struct gendisk *disk, int partno,
bdev->bd_start_sect = start;
bdev_set_nr_sectors(bdev, len);
+ bdev->bd_part_flags = flags;
if (info) {
err = -ENOMEM;
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index db026b6ec15a..4d43b80cb9e9 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -40,6 +40,7 @@ struct block_device {
#endif
struct kobject *bd_holder_dir;
u8 bd_partno;
+ u8 bd_part_flags;
/* number of times partitions within this device have been opened. */
unsigned bd_part_count;
--
2.29.2
next prev parent reply other threads:[~2021-02-24 4:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-24 3:58 [PATCH V2 0/3] block: avoid to drop & re-add partitions if partitions aren't changed Ming Lei
2021-02-24 3:58 ` [PATCH V2 1/4] block: define parsed_partitions.flags as 'unsigned char' Ming Lei
2021-02-24 4:32 ` Chaitanya Kulkarni
2021-02-24 3:58 ` Ming Lei [this message]
2021-02-24 3:58 ` [PATCH V2 3/4] block: re-organize blk_add_partitions Ming Lei
2021-02-24 3:58 ` [PATCH V2 4/4] block: avoid to drop & re-add partitions if partitions aren't changed Ming Lei
2021-02-24 8:18 ` [PATCH V2 0/3] " Christoph Hellwig
2021-02-24 11:23 ` Ming Lei
2021-02-24 16:14 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210224035830.990123-3-ming.lei@redhat.com \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=emilne@redhat.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.