Project

General

Profile

Actions

Feature #10463

closed

use SEEK_DATA/SEEK_HOLE for FileStore fiemap() implementation

Added by Sage Weil over 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

In an exchange on linux-fsdevel yesterday it became clear that even when
FIEMAP isn't buggy it's not a good interface to build a map of sparse
files. For example, XFS defrag or other future fs features may muck with
fiemap results. One wouldn't expect those things to change whether a file
extent is allocated or not allocated, but given what we've seen so far I
wouldn't bet on it.

Instead, we should use lseek SEEK_DATA/SEEK_HOLE, which is a more natural
interface for what we need. This should simply be a matter of replacing
the fiemap() method implementation in FileStore.cc, I think.

See this thread:

http://marc.info/?l=linux-fsdevel&m=142050204317588&w=2

The other half of this is we should confirm that xfstests.git has good
SEEK_HOLE/SEEK_DATA stress tests (that verify correct results on both
recently written, recently synced, and uncached files).

Actions #1

Updated by Sage Weil over 9 years ago

  • Target version changed from v0.94 to v0.93 - Last Hammer Sprint
Actions #2

Updated by Neil Levine over 9 years ago

  • Target version deleted (v0.93 - Last Hammer Sprint)
Actions #3

Updated by Haomai Wang over 9 years ago

  • Assignee set to Haomai Wang
Actions #4

Updated by Haomai Wang over 9 years ago

@Sage Weil

do we need to reserve or fallback to fiemap if SEEK_DATA not supported?

Actions #5

Updated by Sage Weil about 9 years ago

  • Target version set to v0.95
Actions #6

Updated by Sage Weil about 9 years ago

  • Status changed from New to Fix Under Review
Actions #7

Updated by Sage Weil about 9 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF