Re: another 2TB issue in 2.4.33pre
"Peter T. Breuer" <[email protected]> Wed, 28 Jun 2006 20:40:18 +0200 (MET DST)
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Message-ID | <[email protected]> |
"Also sprach Florian Frank:"
> enbd-client 7356: client (-1) will set size 1229375668224
> enbd-client 7356: BLKGETSIZE failed
> enbd-client 7356: sending ENBD_SET_SECTORS64 2401124352
> enbd-client 7356: ENBD_SET_SECTORS64 succeeded
Oh. It should therefore be happy.
> enbd-client 7356: client (-1) set device size 1229375668224
Indeed, the routine returns with 2401124352 (the 64 bit number of
sectors) as result.
> enbd-client 7356: #2511 setkernelnbd: Failed set size 1229375668224 on fd 4:
> File too large
Aha. My bad. The routine which receives the result puts it in an int
which it then checks for sign. Goodness gracious.
It would be better to have the setdevicesize routine return just "0". I
can't see anywhere it needs the number of sectors as a result.
Can you change
static u64
setdevicesize (struct nbd_client *self, u64 size64)
to
static int
setdevicesize (struct nbd_client *self, u64 size64)
and at the end of the routine, change
return sectors64;
to
return 0;
Tell me how that goes. Thanks.
Peter