Re: [PATCH 1/9] MD: add a new disk role to present cache device
From: NeilBrown <hidden>
Date: 2015-08-05 00:25:20
On Tue, 4 Aug 2015 18:17:25 +0000 Song Liu [off-list ref] wrote:
quoted
-----Original Message----- From: Christoph Hellwig [mailto:hch@infradead.org] Sent: Tuesday, August 4, 2015 7:28 AM To: Shaohua Li Cc: linux-raid@vger.kernel.org; Kernel Team; Song Liu; hch@infradead.org; dan.j.williams@intel.com; neilb@suse.de Subject: Re: [PATCH 1/9] MD: add a new disk role to present cache devicequoted
case 0xfffe: /* faulty */ set_bit(Faulty, &rdev->flags); break; + case 0xfffd: /* cache device */Any chance to get constants for these magic numbers as an additional prep patch?I will add patch for special roles (spare, faulty, cache, etc.).quoted
Also I don't really think that adding the role without the actual implementation is that useful.Currently, we are planning to use 0xfffd for both "cache device" and "journal device" (fix write hole only). Would you prefer to separate these two scenarios with two different roles (0xfffd and 0xfffc)?
No, definitely not. It is a log device. whether it is being used just to close the write hole or more aggressively as a write-ahead cache to reduce latency doesn't change the nature of the data on the device. So just one new device type: "log" or "journal" or something describing what is on the device. Thanks, NeilBrown