From mboxrd@z Thu Jan 1 00:00:00 1970 From: Goswin von Brederlow Subject: Re: Query regarding stripe management in linux md-raid Date: Mon, 04 May 2009 19:04:04 +0200 Message-ID: <87y6tclrzv.fsf@frosties.localdomain> References: <18935.36392.65600.930716@notabene.brown> <87zldwjybm.fsf@frosties.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: (Kunal Kushwaha's message of "Sat, 2 May 2009 12:48:18 +0530") Sender: linux-raid-owner@vger.kernel.org To: Kunal Kushwaha Cc: Goswin von Brederlow , Neil Brown , linux-raid@vger.kernel.org List-Id: linux-raid.ids Kunal Kushwaha writes: > Hi Goswin, > > My understanding of chunk size is that, it is minimum unit of data > that is used for read/write. > Chunk size defines, amount of data written on one disk after breaking > it in equal no of chunks. > Chunk size = Stripe size / (disks in array - parity disks) > > so for raid 5, chunk_size = Stripe_Size / (total_disks -1) > and for raid 6, chunk_size = Stripe_Size / total_disks -2) > > and parity is also written in terms of chunk size. > > Now considering a case where IO request came for complete 1 stripe, we > need buffer, for 1 stripe, but since we allocated 1 page per chunk, > instead of 64k buffer we have only 4k buffer, So how this is handled? No. read/write are generaly handled on a page size level, which almost always means 4k. If you think about it you can easily split a chunk into 4k bits and handle each one independently. MfG Goswin