linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Tomas <alex@clusterfs.com>
To: Valerie Clement <valerie.clement@bull.net>
Cc: Alex Tomas <alex@clusterfs.com>, linux-ext4@vger.kernel.org
Subject: Re: [RFC] ext4-delayed-allocation.patch
Date: Fri, 12 Jan 2007 17:52:29 +0300	[thread overview]
Message-ID: <m31wm05mc2.fsf@bzzz.home.net> (raw)
In-Reply-To: <45A79F07.7010204@bull.net> (Valerie Clement's message of "Fri\, 12 Jan 2007 15\:45\:27 +0100")


ah, you're right. thanks!

thanks, Alex

>>>>> Valerie Clement (VC) writes:

 VC> Hi Alex,
 VC> I tested your patch on my system with a 20TB device, but some tests
 VC> failed. Looking at the code, I saw that the support of 48-bit block
 VC> number in extents is lacking.

 VC> I made some changes in the code (see the patch in attachment) and now
 VC> all my tests are OK.
 VC> The patch is not complete, I didn't update calls to wb_debug() which
 VC> dump "ee_start".

 VC> Hope this helps.

 VC>   Valérie

 VC> Index: linux-2.6.20-rc1/fs/ext4/writeback.c
 VC> ===================================================================
 VC> --- linux-2.6.20-rc1.orig/fs/ext4/writeback.c	2007-01-09 18:41:27.000000000 +0100
 VC> +++ linux-2.6.20-rc1/fs/ext4/writeback.c	2007-01-11 13:25:38.000000000 +0100
 VC> @@ -274,7 +274,8 @@ static int ext4_wb_submit_extent(struct 
 VC>  	struct inode *inode = wc->mapping->host;
 VC>  	int blkbits = inode->i_blkbits;
 VC>  	struct page *page;
 VC> -	unsigned long blk, off, len, remain;
 VC> +	ext4_fsblk_t off;
 VC> +	unsigned long blk, len, remain;
 VC>  	unsigned long pstart, plen, prev;
 VC>  	struct bio *bio = NULL;
 VC>  	int nr_pages;
 VC> @@ -332,6 +333,7 @@ alloc_new_bio:
 VC>  			nr_pages = (ex->ee_len - (blk - ex->ee_block));
 VC>  			nr_pages = (nr_pages >> (PAGE_CACHE_SHIFT - blkbits));
 VC>  			off = ex->ee_start + (blk - ex->ee_block);
 VC> +			off |= (ext4_fsblk_t) ex->ee_start_hi << 32;
 VC>  			bio = ext4_wb_bio_alloc(inode, off, nr_pages + 2);
 VC>  			if (bio == NULL)
 VC>  				return -ENOMEM;
 VC> @@ -377,7 +379,9 @@ ext4_wb_find_goal(struct inode *inode, s
 		
 VC>  		/* try to predict block placement */
 VC>  		if ((ex = path[depth].p_ext))
 VC> -			return ex->ee_start + (block - ex->ee_block);
 VC> +			return ((ex->ee_start
 VC> +				| ((ext4_fsblk_t) ex->ee_start_hi << 32))
 VC> +				+ (block - ex->ee_block);
 
 VC>  		/* it looks index is empty
 VC>  		 * try to find starting from index itself */
 VC> @@ -416,7 +420,8 @@ static int ext4_wb_handle_extent(struct 
 VC>  				(unsigned) ec->ec_block,
 VC>  				(unsigned) ec->ec_len,
 VC>  				(unsigned) ec->ec_start);
 VC> -		nex.ee_start = ec->ec_start;
 VC> +		nex.ee_start = ec->ec_start & 0xffffffff;
 VC> +		nex.ee_start_hi = (ec->ec_start >> 32) & 0xffff;
 VC>  		nex.ee_block = ec->ec_block;
 VC>  		nex.ee_len = ec->ec_len;
 VC>  		err = ext4_wb_submit_extent(wc, NULL, &nex, 0);
 VC> @@ -488,8 +493,8 @@ static int ext4_wb_handle_extent(struct 
 VC>  			pblock, count, inode->i_ino, ec->ec_len);
 
 VC>  	/* insert new extent */
 VC> -	nex.ee_start = pblock;
 VC> -	nex.ee_start_hi = 0;
 VC> +	nex.ee_start = pblock & 0xffffffff;
 VC> +	nex.ee_start_hi = (pblock >> 32) & 0xffff;
 VC>  	nex.ee_len = count;
 VC>  	nex.ee_block = ec->ec_block;
 VC>  	err = ext4_ext_insert_extent(handle, inode, path, &nex);
 VC> @@ -520,7 +525,9 @@ static int ext4_wb_handle_extent(struct 
 VC>  	/* block have been allocated for data, so time to drop dirty
 VC>  	 * in correspondend buffer_heads to prevent corruptions */
 VC>  	for (i = 0; i < nex.ee_len; i++)
 VC> -		unmap_underlying_metadata(sb->s_bdev, nex.ee_start + i);
 VC> +		unmap_underlying_metadata(sb->s_bdev,
 VC> +				((ext4_fsblk_t) nex.ee_start_hi << 32)
 VC> +				+ nex.ee_start + i);
 
 VC>  	/* correct on-disk inode size */
 VC>  	if (nex.ee_len > 0) {

  reply	other threads:[~2007-01-12 14:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-22 20:20 [RFC] delayed allocation for ext4 Alex Tomas
2006-12-22 20:23 ` [RFC] booked-page-flag.patch Alex Tomas
2006-12-22 20:25 ` [RFC] ext4-block-reservation.patch Alex Tomas
2006-12-23 22:40   ` Andrew Morton
2006-12-23 22:47     ` Alex Tomas
2006-12-22 20:28 ` [RFC] ext4-delayed-allocation.patch Alex Tomas
2006-12-23 22:59   ` Andrew Morton
2007-01-12 14:45   ` Valerie Clement
2007-01-12 14:52     ` Alex Tomas [this message]
2006-12-23  3:31 ` [RFC] delayed allocation for ext4 David Chinner
2006-12-23  9:27   ` Christoph Hellwig
2006-12-23 19:15     ` Alex Tomas
2006-12-29  2:50     ` David Chinner
2006-12-23 19:09   ` Alex Tomas
2006-12-29  2:52     ` David Chinner
2006-12-29  4:56       ` Alex Tomas

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=m31wm05mc2.fsf@bzzz.home.net \
    --to=alex@clusterfs.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=valerie.clement@bull.net \
    /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;
as well as URLs for NNTP newsgroup(s).