{"id":17322379,"url":"https://github.com/jenting/fiemap-retrieval","last_synced_at":"2026-02-02T13:11:06.315Z","repository":{"id":47125015,"uuid":"470584581","full_name":"jenting/fiemap-retrieval","owner":"jenting","description":"Fiemap retrieval on sparse file with multiple extents","archived":false,"fork":false,"pushed_at":"2024-12-22T08:05:03.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-16T20:33:56.254Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenting.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-16T13:00:24.000Z","updated_at":"2025-02-13T23:39:44.000Z","dependencies_parsed_at":"2022-09-05T09:12:32.764Z","dependency_job_id":null,"html_url":"https://github.com/jenting/fiemap-retrieval","commit_stats":null,"previous_names":["jenting/fiemap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jenting/fiemap-retrieval","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenting%2Ffiemap-retrieval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenting%2Ffiemap-retrieval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenting%2Ffiemap-retrieval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenting%2Ffiemap-retrieval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenting","download_url":"https://codeload.github.com/jenting/fiemap-retrieval/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenting%2Ffiemap-retrieval/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29012691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T12:48:30.580Z","status":"ssl_error","status_checked_at":"2026-02-02T12:46:38.384Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T13:41:57.246Z","updated_at":"2026-02-02T13:11:06.299Z","avatar_url":"https://github.com/jenting.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Fiemap retrieval on sparse file with multiple extents\n\nThe [fiemap](https://www.kernel.org/doc/Documentation/filesystems/fiemap.txt) is an efficient way for userspace to get file extent mappings. Instead of block-by-block mapping, fiemap returns a list of extents.\n\n- Generate sparse file with multiple extents.\n  ```shell\n  make\n  ./generator\n  ```\n\n- Install fiemap tool.\n  ```shell\n  sudo apt install gcc make -y\n  wget https://github.com/joshimoo/fiemap/archive/refs/tags/v0.2.0.tar.gz\n  tar zxvf v0.2.0.tar.gz\n  cd fiemap-0.2.0\n  make\n  sudo make install\n  ```\n\n- Use `ls -lsah` to see the sparse file actual used space as well as max space.\n  Example below 1GB allocated, 514MB used.\n  ```shell\n  514M -rw-r--r-- 1 jenting users 1.0G Mar 17 08:36 /tmp/  ssync-src-fiemap-1gb-file\n  ```\n\n- Then run `fiemap`.\n  ```shell\n  fiemap /tmp/ssync-src-fiemap-1gb-file\n  ```\n  If the initial 1024 retrieval takes around 3 minutes you can cancel it via ctrl+c this will take another 3 minutes till the process returns from the kernel. This is a slow EXT4 extent retrieval -\u003e Bad Kernel.\n  If the initial 1024 retrievals takes 0 seconds than you are good and can let it run to completion. -\u003e Good Kernel.\n\n  Example of a full run on a newer 5.8 kernel\n  ```shell\n  retrieved 1024 extents in 0 seconds\n\n  fiemap done retrieved 131072 extents in 39 seconds\n  File /tmp/ssync-src-fiemap-1gb-file has 131072 extents:\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenting%2Ffiemap-retrieval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenting%2Ffiemap-retrieval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenting%2Ffiemap-retrieval/lists"}