diff options
author | root <root@rshg054.dnsready.net> | 2012-03-01 03:21:19 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-03-01 03:21:19 +0000 |
commit | 6f297b1cf462a11227d811a87124006c55911d63 (patch) | |
tree | 325073cc18485496bf07d32e56edf643f3b7a2bf /core/libarchive/skip-fiemap-on-unavail.patch | |
parent | 32b05a621cb20af1bd4b7cd6f5609b7512bb20f1 (diff) |
Thu Mar 1 03:21:19 UTC 2012
Diffstat (limited to 'core/libarchive/skip-fiemap-on-unavail.patch')
-rw-r--r-- | core/libarchive/skip-fiemap-on-unavail.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/core/libarchive/skip-fiemap-on-unavail.patch b/core/libarchive/skip-fiemap-on-unavail.patch new file mode 100644 index 000000000..d054aea4e --- /dev/null +++ b/core/libarchive/skip-fiemap-on-unavail.patch @@ -0,0 +1,41 @@ +From 293687358e2c52213a3f077bb3d8f860ea5bfda9 Mon Sep 17 00:00:00 2001 +From: Michihiro NAKAJIMA <ggcueroad@gmail.com> +Date: Mon, 6 Feb 2012 04:51:16 +0900 +Subject: [PATCH] Fix issue 238. Skip the setup sparse on linux without a + check of errno if ioctl(,FS_IOC_FIEMAP,) failed because the + errno is not fixed , for example, some file system returns + ENOTTY, another returns EOPNOTSUPP, or EINVAL and so on. We + cannot decide what errno exactly indicates an unsupported + error. + +--- + libarchive/archive_read_disk_entry_from_file.c | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c +index eef42ef74..6415008 100644 +--- a/libarchive/archive_read_disk_entry_from_file.c ++++ b/libarchive/archive_read_disk_entry_from_file.c +@@ -859,16 +859,9 @@ setup_sparse(struct archive_read_disk *a, + + r = ioctl(fd, FS_IOC_FIEMAP, fm); + if (r < 0) { +- /* When errno is ENOTTY, it is better we should +- * return ARCHIVE_OK because an earlier version +- *(<2.6.28) cannot perfom FS_IOC_FIEMAP. +- * We should also check if errno is EOPNOTSUPP, +- * it means "Operation not supported". */ +- if (errno != ENOTTY && errno != EOPNOTSUPP) { +- archive_set_error(&a->archive, errno, +- "FIEMAP failed"); +- exit_sts = ARCHIVE_FAILED; +- } ++ /* When something error happens, it is better we ++ * should return ARCHIVE_OK because an earlier ++ * version(<2.6.28) cannot perfom FS_IOC_FIEMAP. */ + goto exit_setup_sparse; + } + if (fm->fm_mapped_extents == 0) +-- +1.7.9.2 + |