diff options
Diffstat (limited to 'meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch')
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch new file mode 100644 index 0000000000..3b1d7fe02d --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From ad8078ca2ef35c91bedad61c9e2a6c01bf13a605 Mon Sep 17 00:00:00 2001 | ||
2 | From: Palmer Dabbelt <palmer@dabbelt.com> | ||
3 | Date: Fri, 29 Dec 2017 10:19:51 -0800 | ||
4 | Subject: [PATCH] misc: rename copy_file_range to copy_file_chunk | ||
5 | |||
6 | As of 2.27, glibc will have a copy_file_range library call to wrap the | ||
7 | new copy_file_range system call. This conflicts with the function in | ||
8 | misc/create_inode.c, which this patch renames _copy_file_range. | ||
9 | |||
10 | Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com> | ||
11 | Signed-off-by: Theodore Ts'o <tytso@mit.edu> | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | |||
15 | Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> | ||
16 | --- | ||
17 | misc/create_inode.c | 8 ++++---- | ||
18 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
19 | |||
20 | diff --git a/misc/create_inode.c b/misc/create_inode.c | ||
21 | index ae22ff6f..ea6fa7e7 100644 | ||
22 | --- a/misc/create_inode.c | ||
23 | +++ b/misc/create_inode.c | ||
24 | @@ -392,7 +392,7 @@ static ssize_t my_pread(int fd, void *buf, size_t count, off_t offset) | ||
25 | } | ||
26 | #endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */ | ||
27 | |||
28 | -static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file, | ||
29 | +static errcode_t copy_file_chunk(ext2_filsys fs, int fd, ext2_file_t e2_file, | ||
30 | off_t start, off_t end, char *buf, | ||
31 | char *zerobuf) | ||
32 | { | ||
33 | @@ -466,7 +466,7 @@ static errcode_t try_lseek_copy(ext2_filsys fs, int fd, struct stat *statbuf, | ||
34 | |||
35 | data_blk = data & ~(fs->blocksize - 1); | ||
36 | hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1); | ||
37 | - err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf, | ||
38 | + err = copy_file_chunk(fs, fd, e2_file, data_blk, hole_blk, buf, | ||
39 | zerobuf); | ||
40 | if (err) | ||
41 | return err; | ||
42 | @@ -517,7 +517,7 @@ static errcode_t try_fiemap_copy(ext2_filsys fs, int fd, ext2_file_t e2_file, | ||
43 | goto out; | ||
44 | for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents; | ||
45 | i++, ext++) { | ||
46 | - err = copy_file_range(fs, fd, e2_file, ext->fe_logical, | ||
47 | + err = copy_file_chunk(fs, fd, e2_file, ext->fe_logical, | ||
48 | ext->fe_logical + ext->fe_length, | ||
49 | buf, zerobuf); | ||
50 | if (err) | ||
51 | @@ -570,7 +570,7 @@ static errcode_t copy_file(ext2_filsys fs, int fd, struct stat *statbuf, | ||
52 | goto out; | ||
53 | #endif | ||
54 | |||
55 | - err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf, | ||
56 | + err = copy_file_chunk(fs, fd, e2_file, 0, statbuf->st_size, buf, | ||
57 | zerobuf); | ||
58 | out: | ||
59 | ext2fs_free_mem(&zerobuf); | ||
60 | -- | ||
61 | 2.16.2 | ||
62 | |||