lkml.org 
[lkml]   [2005]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: why CURRENT->sector is zero??

Hello.

> I downloaded sbull.c (for LDD 2nd Edition) from

Please note that sbull is a block device not hosting partitions.

> of req->sector in sbull_transfer function). The observations are as follows:
> File System req->sector
> msdos 0
> vfat 0
> ext2 2
> ext3 2
> iso9000 72

If there is no filesystem in the device, you just get the probe
transfers. Not very interesting, indeed. Some filesystems have their
magic number in the first sector, and some have it later in the device.

> I don't know about other file systems, but I believe the value of
> req->sector for msdos/vfat is wrong. Because when I mount a CF card having
> FAT file system on my Linux box (using USB mass storage driver), the first
> read request contains sector 0x20.

Before you state it's wrong you should see some effect. In your case
there is no effect at all. If you make a filesystem on the device you'll
see it works. So if this concerns you, you should look for an explanation
rather than saying it is wrong.

> Does someone have any clue, why sbull gets this value as 0 rather then 0x20?

I suspect because the device is not partitioned, while the other one is,
so every transfer just is done inside the partition (while the low-level
access uses absolute sector number of the device).

/alessandro
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.028 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site