How does PC know what kind of file system the mass storage device has?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
After reading the "USB Mass Storage Class Bulk-Only Transport"
specification, I got a concept about the transmission protocol between
my desktop PC and some portable USB devices such as external HDD and
external DVD-RW. Despite this, I have no idea about how my desktop can
understand the content in the storage media of the mass storage
device. We know the file system is different between HDD and DVD-RW.
Moreover, the file system of a optical disc maybe one of ISO9660, UDF
or UDF bridge...etc. I think after the USB cable is attached, the
device firmware can tell desktop its manufactory information to let
desktop know it is a HDD, CD-RW or DVD-RW. But,  how does PC know what
kind of file system the device has?

Could anybody give me any hint or reference document?

Re: How does PC know what kind of file system the mass storage device has?
Quoted text here. Click to load it

It reads the important sector locations from the disk and tries to recognize
the filesystem.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
We've slightly trimmed the long signature. Click to see the full one.
Re: How does PC know what kind of file system the mass storage device has?
Quoted text here. Click to load it

But, as my understanding, the "important sector" is different between
HDD and optical disc. For HDD, we can get file system parameters from
sector 0 but for disc, we might need sector 16 to recognize its file
system. Because PC only can use UFI commands(like SCSI commands) to
communicate with device, does PC know which sector it should request
after it knows what kind of peripheral the device is? I guess there
should be a scheme which defines what data PC should request at first.
However, I don't know how to find related articles efficiently by
Google yet.

Re: How does PC know what kind of file system the mass storage device has?
Quoted text here. Click to load it

The OS kernel - be it Windows or UNIX - enumerates all filesystems and asks
each one to mount. If the FS returned OK - then all is done. If the FS returned
error - then the next FS is tried.

UNIX also supports only trying a particular filesystem, Windows does not.

So, FSs execute the recognition sequence themselves, and are free to issue any
reads they want. CDFS will read sector 16. UDF will read sectors 256, N and N -
256. FAT will read sector 0, and so on.

All of this is the issue of the OS kernel, not of the hardware. Hardware can
only execute CDBs.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
We've slightly trimmed the long signature. Click to see the full one.
Re: How does PC know what kind of file system the mass storage device has?
Quoted text here. Click to load it

The USB bulk-only transport is used to carry SCSI commands
and responses. The SCSI INQUIRY command returns information
about the type of device, as well as manufacturer and product
information.

Quoted text here. Click to load it

dpANS Project T10/1236-D SCSI Primary Commands - 2

Once you crank it up, its just reading blocks
(typically 512 bytes each).

The MBR (Master Boot Record) describes the partitioning
and individual partitions contain various file-systems,


--
Michael N. Moran           (h) 770 516 7918
5009 Old Field Ct.         (c) 678 521 5460
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline