Understanding and attempting to apply the git patch to a fuse file system

I have a file system based on fuses, to improve it, I need to implement this approach https://lwn.net/Articles/674286/

I understand what I should git apply < patch >, the problem is that I do not understand where exactly this patch should be applied?

the fix attempts to modify several files, for example:

a/fs/fuse/Makefile
a/fs/fuse/dev.c
b/fs/fuse/dev.c
a/fs/fuse/dir.c
b/fs/fuse/dir.c
etc..

which I could not find with the command locate, also tried to lose the prefix "a" and "b" and found only the makefile.

  • Note: libfuse-dev is installed
+4
source share
1 answer

Linux. Linux, :

$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

. -. https://patchwork.kernel.org/; , , https://patchwork.kernel.org/patch/8182901. mbox , v5-fuse-Add-support-for-passthrough-read-write.patch. , git am Linux:

$ cd linux
$ git am /path/to/v5-fuse-Add-support-for-passthrough-read-write.patch

, 2016 , , , . "", " "; :

Applying: fuse: Add support for passthrough read/write
error: patch failed: fs/fuse/Makefile:5
error: fs/fuse/Makefile: patch does not apply
error: patch failed: fs/fuse/file.c:252
error: fs/fuse/file.c: patch does not apply
error: patch failed: fs/fuse/fuse_i.h:531
error: fs/fuse/fuse_i.h: patch does not apply
error: fs/fuse/fuse_passthrough.h: already exists in working directory
error: patch failed: fs/fuse/inode.c:898
error: fs/fuse/inode.c: patch does not apply
error: fs/fuse/passthrough.c: already exists in working directory
error: patch failed: include/uapi/linux/fuse.h:250
error: include/uapi/linux/fuse.h: patch does not apply
Patch failed at 0001 fuse: Add support for passthrough read/write
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

, , , 2016 . -, git am:

$ git am --abort

1 2016 :

$ git checkout $(git rev-list -1 --before=2016-02-02 --first-parent master)

:

$ git am /path/to/v5-fuse-Add-support-for-passthrough-read-write.patch
Applying: fuse: Add support for passthrough read/write

​​ , , .

, , , , , ? , ?

+5

Source: https://habr.com/ru/post/1674417/


All Articles