[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070105061802.GA25583@amitarora.in.ibm.com>
Date: Fri, 5 Jan 2007 11:48:02 +0530
From: "Amit K. Arora" <aarora@...ux.vnet.ibm.com>
To: Mingming Cao <cmm@...ibm.com>
Cc: Alex Tomas <alex@...sterfs.com>, linux-ext4@...r.kernel.org,
suparna@...ibm.com
Subject: Re: [PATCH 1/1 version2] Extent overlap bugfix in ext4
On Thu, Jan 04, 2007 at 11:47:36AM -0800, Mingming Cao (MC) wrote:
> Alex Tomas (AT) wrote:
>
> >>>>>>Amit K Arora (AKA) writes:
> >
> >
> > > AKA> @@ -1984,6 +2034,10 @@ int ext4_ext_get_blocks(handle_t *handle
> > > AKA> */
> > > AKA> if (ee_len > EXT_MAX_LEN)
> > > AKA> goto out2;
> > > AKA> +
> > > AKA> + if (iblock < ee_block && iblock + max_blocks >=
> > > ee_block)
> > > AKA> + allocated = ee_block - iblock;
> > > AKA> +
> > > AKA> /* if found extent covers block, simply return it */
> > > AKA> if (iblock >= ee_block && iblock < ee_block +
> > > ee_len) {
> > > AKA> newblock = iblock - ee_block + ee_start;
> > >
> > AT> I thought existing code already does this:
> >
> > AT> /* if found extent covers block, simply return it */
> > AT> if (iblock >= ee_block && iblock < ee_block + ee_len) {
> > AT> newblock = iblock - ee_block + ee_start;
> > AT> /* number of remaining blocks in the extent */
> > AT> allocated = ee_len - (iblock - ee_block);
> MC> That's different: the existing code address the case when the left part
> MC> of the new extent overlaps with an exisitng extent, in that case I
> MC> understand it just returns the allocated part of extent, and continue
> MC> the block allocation in the next call of get_blocks().
Right.
> MC> Well Amit's new code here trying to address the case when the right part
> MC> of the new extent overlap with an exisitng extent. He was trying to
> MC> update the new extent length to prevent that. As I mentioned ealier we
> MC> could put this code into ext4_ext_check_overlap,let it judge whether
> MC> there is overlap, and if so, what's the right start block number and length
Yes, this check will no longer be required with the modified
ext4_ext_check_overlap, which will check for this condition as well.
--
Regards,
Amit Arora
>
> Thanks,
> Mingming
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists