From mboxrd@z Thu Jan 1 00:00:00 1970 From: Milan Broz Subject: Re: How to test the read/write flow of dm-target. Date: Sun, 30 Jan 2011 20:27:07 +0100 Message-ID: <4D45BB8B.1000107@redhat.com> References: <20110128194241.GB4616@us.ibm.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: device-mapper development Cc: nishant mungse List-Id: dm-devel.ids On 01/30/2011 07:37 PM, nishant mungse wrote: > Is there any way to find the last sector of bio. Use csope to study kernel code, there is lot of examples in existing code. For last used sector in bio you probably want last_used_sector = bio->bi_sector + bio_sectors(bio) - 1; Milan p.s. Please do not post repeated questions in different threads (and spam messages like chat invitations) to list, thank you.