public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: axboe@kernel.dk
Cc: linux-bcache@vger.kernel.org, linux-block@vger.kernel.org,
	Coly Li <colyli@suse.de>
Subject: [PATCH 2/8] bcache: reserve never used bits from bkey.high
Date: Wed, 20 Oct 2021 22:38:06 +0800	[thread overview]
Message-ID: <20211020143812.6403-3-colyli@suse.de> (raw)
In-Reply-To: <20211020143812.6403-1-colyli@suse.de>

There sre 3 bits in member high of struct bkey are never used, and no
plan to support them in future,
- HEADER_SIZE, start at bit 58, length 2 bits
- KEY_PINNED,  start at bit 55, length 1 bit

No any kernel code, or user space tool references or accesses the three
bits. Therefore it is possible and feasible to reserve the valuable bits
from bkey.high. They can be used in future for other purpose.

Signed-off-by: Coly Li <colyli@suse.de>
---
 include/uapi/linux/bcache.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/bcache.h b/include/uapi/linux/bcache.h
index cf7399f03b71..97413586195b 100644
--- a/include/uapi/linux/bcache.h
+++ b/include/uapi/linux/bcache.h
@@ -43,9 +43,9 @@ static inline void SET_##name(struct bkey *k, unsigned int i, __u64 v)	\
 #define KEY_MAX_U64S		8
 
 KEY_FIELD(KEY_PTRS,	high, 60, 3)
-KEY_FIELD(HEADER_SIZE,	high, 58, 2)
+KEY_FIELD(__PAD0,	high, 58, 2)
 KEY_FIELD(KEY_CSUM,	high, 56, 2)
-KEY_FIELD(KEY_PINNED,	high, 55, 1)
+KEY_FIELD(__PAD1,	high, 55, 1)
 KEY_FIELD(KEY_DIRTY,	high, 36, 1)
 
 KEY_FIELD(KEY_SIZE,	high, 20, KEY_SIZE_BITS)
-- 
2.31.1


  parent reply	other threads:[~2021-10-20 14:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20 14:38 [PATCH 0/8] bcache patches for Linux v5.16 (first wave) Coly Li
2021-10-20 14:38 ` [PATCH 1/8] md: bcache: Fix spelling of 'acquire' Coly Li
2021-10-20 14:38 ` Coly Li [this message]
2021-10-20 14:38 ` [PATCH 3/8] bcache: fix error info in register_bcache() Coly Li
2021-10-20 14:38 ` [PATCH 4/8] bcache: move calc_cached_dev_sectors to proper place on backing device detach Coly Li
2021-10-20 14:38 ` [PATCH 5/8] bcache: remove the cache_dev_name field from struct cache Coly Li
2021-10-20 14:38 ` [PATCH 6/8] bcache: remove the backing_dev_name field from struct cached_dev Coly Li
2021-10-20 14:38 ` [PATCH 7/8] bcache: use bvec_kmap_local in bch_data_verify Coly Li
2021-10-20 14:38 ` [PATCH 8/8] bcache: remove bch_crc64_update Coly Li
2021-10-20 14:41 ` [PATCH 0/8] bcache patches for Linux v5.16 (first wave) Jens Axboe

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=20211020143812.6403-3-colyli@suse.de \
    --to=colyli@suse.de \
    --cc=axboe@kernel.dk \
    --cc=linux-bcache@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox