-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can zbc target use device file as backstore? #638
Comments
I looked at this too, and there were some operations that work on regular files but won't work on a block device file, specifically this truncate operation Line 681 in ddc7d14
There is also a very intentional looking check, Line 789 in ddc7d14
I don't think there's anything actively preventing a patchset from being authored to loosen the requirements, and I don't think it has anything to do with target_core_iblock, but more that managing the metadata and data blocks inside a much larger file (an entire block device) sounds complicated. What do you mean by |
Thanks, @ryanattard. I see it cannot work on the device file since it needs the My first concern is that access to the metadata of the file system will trigger more small I/O compared to operating on the original HM-SMR drive, especially if ext4 does not allocate inodes in advance. Second, I'm afraid that the blocks of a zone may not be continuous in PBA when using the large regular file. For example, if I randomly write this file with small blocks across regions (the drive is empty at the beginning), the filesystem will allocate inodes and data pages on demand for these scattered LBA that does likely not correspond to the layout of PBA. If I don't need |
I'd like to use the regular block device as backing device for zbc too, testing zoned support on btrfs. I can create the backing files on a regular filesystem but that's another layer of indirection that is IMO unnecessary. I've tried to omit the |
When i was trying to create a ZBC TCMU target as Zone block device emulator using this command,
with setting the dev file
/dev/sdb
as backing storage, but it failed.I know it will work by a regular file, but since regular files will still pass through the file system which has a variable data block layout, I think it is probably not a good way to emulate the zone behavior in the physical address space.
So I wonder that if there is possible to use a physical device as the backstore of the zbc target, since I've noticed that the TCMU interface (maybe) allows doing this by
target_core_iblock()
. @The text was updated successfully, but these errors were encountered: