mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
copy: always use FIEMAP_FLAG_SYNC, for now
* src/extent-scan.c (extent_need_sync): Always return true, to make the sole caller always use FIEMAP_FLAG_SYNC. This will doubtless have an undesirable performance impact, but we'll mitigate that shortly, by using extent_copy only on files with holes.
This commit is contained in:
1 parent
48306b83be
commit
9bcd045f81
1 file changed
+8
@@ -36,6 +36,13 @@
|
||||
static bool
|
||||
extent_need_sync (void)
|
||||
{
|
||||
/* For now always return true, to be on the safe side.
|
||||
If/when FIEMAP semantics are well defined (before SEEK_HOLE support
|
||||
is usable) and kernels implementing them are in use, we may relax
|
||||
this once again. */
|
||||
return true;
|
||||
|
||||
#if FIEMAP_BEHAVIOR_IS_DEFINED_AND_USABLE
|
||||
static int need_sync = -1;
|
||||
|
||||
if (need_sync == -1)
|
||||
@@ -57,6 +64,7 @@ extent_need_sync (void)
|
||||
}
|
||||
|
||||
return need_sync;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Allocate space for struct extent_scan, initialize the entries if
|
||||
|
||||
Reference in new issue
Block a user