From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: [PATCH 09/24] dm cache metadata: check the metadata version when reading the superblock Date: Fri, 25 Oct 2013 15:53:54 -0400 Message-ID: <20131025195354.GC4804@redhat.com> References: <1382639437-27007-1-git-send-email-snitzer@redhat.com> <1382639437-27007-10-git-send-email-snitzer@redhat.com> <20131025170711.GI17070@agk-dp.fab.redhat.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20131025170711.GI17070@agk-dp.fab.redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: dm-devel@redhat.com, Morgan Mears , Heinz Mauelshagen , Joe Thornber List-Id: dm-devel.ids On Fri, Oct 25 2013 at 1:07pm -0400, Alasdair G Kergon wrote: > On Thu, Oct 24, 2013 at 02:30:22PM -0400, Mike Snitzer wrote: > > From: Joe Thornber > > > +++ b/drivers/md/dm-cache-metadata.c > > @@ -20,7 +20,13 @@ > > > + * defines a range of metadata versions that this module can handle. > > > +{ > > + uint32_t metadata_version = le32_to_cpu(disk_super->version); > > + > > > + if (metadata_version < MIN_CACHE_VERSION || metadata_version > MAX_CACHE_VERSION) { > > + DMERR("kernel does not support this version of cache metadata (%u)", > > + metadata_version); > > - Also state the range supported? > "Cache metadata version %u found, but only versions between %u and %u supported." Done.