Ticket #975 (new enhancement)

Opened 21 months ago

Last modified 17 months ago

the filesystem API should support sparse files for the call "get_file_map"

Reported by: korli Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1 development
Cc: Blocked By:
Platform: All Blocking:

Description

the UDF filesystem uses sparse files (with blank chunks). The current API doesn't allow to describe such files. A proposed solution is to add a field "blank" to the struct file_io_vec for such blank chunks.

Change History

Changed 21 months ago by korli

  • milestone set to R1

Changed 17 months ago by wkornewald

  • type changed from bug to enhancement

Changed 17 months ago by korli

I wouldn't call this an enhancement given the impact on the UDF filesystem, anyway ...

Changed 17 months ago by wkornewald

Hmm, I just found that bug doesn't fit (it's about extending the API), but feel free to change it to "bug". We'll need to define how we want to use Trac for release planning (what role do type and priority play, etc.) at some point.

Changed 17 months ago by bonefish

Adding at least read support for sparse files to the file cache (which would suffice for UDF) should require relatively few changes. It wouldn't even be necessary to add another field to file_io_vec; one could simply use a negative offset as indicator.

In fact the only two changes necessary should be to

  • replace negative offsets by LONG_LONG_MIN in file_cache.cpp:get_file_map() and
  • use a small wrapper for vfs_read_pages() which simply clears the pages in case of a negative offset.
Note: See TracTickets for help on using tickets.