Skip to content
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

file_handle::extents on Windows does not trim the returned list correctly #155

Open
ned14 opened this issue Jan 10, 2025 Discussed in #154 · 1 comment
Open

file_handle::extents on Windows does not trim the returned list correctly #155

ned14 opened this issue Jan 10, 2025 Discussed in #154 · 1 comment
Labels

Comments

@ned14
Copy link
Owner

ned14 commented Jan 10, 2025

Discussed in #154

Originally posted by tastewar January 10, 2025
We have a snippet of code that is intended to process sparse holes in files with a loop like this:

   std::vector<llfio::file_handle::extent_pair> ext = GetFileHandle().extents().value();
   uint32_t startBlock = 0, endBlock = 0, oldEndBlock = 0;
   for (auto it = ext.begin(); it != ext.end(); it++)
   {
   }

Seems to work fine on Linux, but in Windows, on a newly allocated 4096 byte file, we are getting back that there are 64 extents in the file. The first one looks correct, but the others all have 0xFFFFFFFF for both the beginning and length of the extent. Is this expected? Should we be ignoring any entries in the vector with 0xFFFFFFFF?

@ned14 ned14 added the bug label Jan 10, 2025
@ned14
Copy link
Owner Author

ned14 commented Jan 10, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant