Re: softraid(4) disks are of wrong size

2010-12-20 Thread Marco Peereboom
I am working on this bug and it is a side effect of wrapping VOP_* calls. krw meanwhile commited a fix for the bug that exposed the panic and should make your test case happy. The underlying bug needs more work though but I am working on it. On Mon, Dec 20, 2010 at 06:59:00PM +0100, Andreas Bart

Re: softraid(4) disks are of wrong size

2010-12-20 Thread Andreas Bartelt
On 12/20/10 18:26, Kenneth R Westerback wrote: ... Can you provide the details on the exact panic you saw? Just to make sure when an issue is reproduced we know we are working on the same problem. Debugger panic sr_crypto_finish_io sr_crypto_intr sdstrategy spec_strategy VOP_STRATEGY sr_startw

Re: softraid(4) disks are of wrong size

2010-12-20 Thread Kenneth R Westerback
On Sun, Dec 19, 2010 at 02:17:46PM +0100, Andreas Bartelt wrote: > Hello, > > I've noticed that the size of softraid(4) disks is one sector too large. > > In the following description, the native disk is sd4c (which is of type > RAID), and the corresponding virtual softraid(4) disk will be sd5.

Re: softraid(4) disks are of wrong size

2010-12-20 Thread Kenneth R Westerback
On Mon, Dec 20, 2010 at 08:06:33AM -0500, Kenneth R Westerback wrote: > On Mon, Dec 20, 2010 at 06:24:17PM +1000, David Gwynne wrote: > > On Mon, Dec 20, 2010 at 04:26:59PM +1000, David Gwynne wrote: > > > im pretty sure scsi reports the last addressable sector, as opposed to the > > > total number

Re: softraid(4) disks are of wrong size

2010-12-20 Thread Kenneth R Westerback
On Mon, Dec 20, 2010 at 11:50:21AM +0100, Andreas Bartelt wrote: > On 12/19/10 22:28, Kenneth R Westerback wrote: > ... > >You should NEVER use 'c' partition. Amoung other things, it is > >always set by the kernel to encompass the whole disk, everytime the > >disklabel is read. If you restore to a

Re: softraid(4) disks are of wrong size

2010-12-20 Thread Kenneth R Westerback
On Mon, Dec 20, 2010 at 06:24:17PM +1000, David Gwynne wrote: > On Mon, Dec 20, 2010 at 04:26:59PM +1000, David Gwynne wrote: > > im pretty sure scsi reports the last addressable sector, as opposed to the > > total number of sectors. will have a diff shortly. > > compiles. can someone test? Prett

Re: softraid(4) disks are of wrong size

2010-12-20 Thread Andreas Bartelt
On 12/19/10 22:28, Kenneth R Westerback wrote: ... You should NEVER use 'c' partition. Amoung other things, it is always set by the kernel to encompass the whole disk, everytime the disklabel is read. If you restore to a different sized disk interesting things might happen. I thought we also alwa

Re: softraid(4) disks are of wrong size

2010-12-20 Thread David Gwynne
On Mon, Dec 20, 2010 at 04:26:59PM +1000, David Gwynne wrote: > im pretty sure scsi reports the last addressable sector, as opposed to the > total number of sectors. will have a diff shortly. compiles. can someone test? Index: softraid.c ===

Re: softraid(4) disks are of wrong size

2010-12-19 Thread David Gwynne
im pretty sure scsi reports the last addressable sector, as opposed to the total number of sectors. will have a diff shortly. dlg On 20/12/2010, at 2:15 AM, Marco Peereboom wrote: > I could swear we had the sizes right but I'll have another look at this. > > What raid type did you test this with

Re: softraid(4) disks are of wrong size

2010-12-19 Thread Ted Unangst
On Sun, Dec 19, 2010 at 11:15 AM, Marco Peereboom wrote: > I could swear we had the sizes right but I'll have another look at this. > > What raid type did you test this with? I can repro. Crypto raid. sd0g: size 20986560 this is the real disk sd1a: 20985952 offset 64 sd1c: 20986033 softraid

Re: softraid(4) disks are of wrong size

2010-12-19 Thread Kenneth R Westerback
On Sun, Dec 19, 2010 at 02:17:46PM +0100, Andreas Bartelt wrote: > Hello, > > I've noticed that the size of softraid(4) disks is one sector too large. > > In the following description, the native disk is sd4c (which is of type > RAID), and the corresponding virtual softraid(4) disk will be sd5.

Re: softraid(4) disks are of wrong size

2010-12-19 Thread Otto Moerbeek
On Sun, Dec 19, 2010 at 11:51:31AM -0500, Nick Holland wrote: > On 12/19/10 11:15, Marco Peereboom wrote: > > I could swear we had the sizes right but I'll have another look at this. > > > > What raid type did you test this with? > > > > On Sun, Dec 19, 2010 at 02:17:46PM +0100, Andreas Bartelt

Re: softraid(4) disks are of wrong size

2010-12-19 Thread Nick Holland
On 12/19/10 11:15, Marco Peereboom wrote: > I could swear we had the sizes right but I'll have another look at this. > > What raid type did you test this with? > > On Sun, Dec 19, 2010 at 02:17:46PM +0100, Andreas Bartelt wrote: >> Hello, >> >> I've noticed that the size of softraid(4) disks is

Re: softraid(4) disks are of wrong size

2010-12-19 Thread Andreas Bartelt
On 12/19/10 17:15, Marco Peereboom wrote: I could swear we had the sizes right but I'll have another look at this. What raid type did you test this with? I've only tested CRYPTO, but sr_meta_native_probe() seems to be used by all disciplines. Try newfs /dev/rsdXc where X is a virtual softr

Re: softraid(4) disks are of wrong size

2010-12-19 Thread Marco Peereboom
I could swear we had the sizes right but I'll have another look at this. What raid type did you test this with? On Sun, Dec 19, 2010 at 02:17:46PM +0100, Andreas Bartelt wrote: > Hello, > > I've noticed that the size of softraid(4) disks is one sector too large. > > In the following description

softraid(4) disks are of wrong size

2010-12-19 Thread Andreas Bartelt
Hello, I've noticed that the size of softraid(4) disks is one sector too large. In the following description, the native disk is sd4c (which is of type RAID), and the corresponding virtual softraid(4) disk will be sd5. I will assume that sd5 is of discipline CRYPTO, but the problem should be t