When I set "SectorSize" to 4096 and "StorageType" to "stDiskPnP", some applications can't work with the disk. Why?

In PnP mode the OS builds a stack of drivers on top of the CBFS Connect virtual disk driver (the one that is presented in PnP mode). This driver reports the sector size to be 4096 bytes, but some drivers in the stack change this value back to 512 and the file system driver, which sits on the top of the stack, gets the value of 512 bytes. Now, when the application works with files in nonbuffered mode, it aligns the data to a 512 byte boundary, but the drivers below the file system driver expect a 4096-byte granularity and deny the file operation requests.

The only solution is not to change the 512-byte sector size unless you have particular reasons to do so. Or you can create a virtual file system in non-PnP mode.

Ready to get started?

Learn more about Callback Technologies or download a free trial.

Download Now