Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 119532 - fuse 2.5.0 fails with > 2.6.16-rc1 (patch attached)
Summary: fuse 2.5.0 fails with > 2.6.16-rc1 (patch attached)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefan Schweizer (RETIRED)
URL:
Whiteboard:
Keywords:
: 119533 119534 119617 119676 131036 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-19 04:52 UTC by Patrizio Bassi
Modified: 2006-04-23 15:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrizio Bassi 2006-01-19 04:52:11 UTC
2.6.16 changed some api..as usual :)

fix is from Miklos  Szeredi (fuse mainteiner) and will be merged in 2.5.1

Index: kernel/file.c
===================================================================
RCS file: /cvsroot/fuse/fuse/kernel/file.c,v
retrieving revision 1.94
retrieving revision 1.94.2.1
diff -u -r1.94 -r1.94.2.1
--- kernel/file.c	6 Jan 2006 18:29:39 -0000	1.94
+++ kernel/file.c	18 Jan 2006 12:17:33 -0000	1.94.2.1
@@ -675,9 +675,15 @@
 	struct inode *inode = file->f_dentry->d_inode;
 	ssize_t res;
 	/* Don't allow parallel writes to the same file */
+#ifdef KERNEL_2_6_16_PLUS
+	mutex_lock(&inode->i_mutex);
+	res = fuse_direct_io(file, buf, count, ppos, 1);
+	mutex_unlock(&inode->i_mutex);
+#else
 	down(&inode->i_sem);
 	res = fuse_direct_io(file, buf, count, ppos, 1);
 	up(&inode->i_sem);
+#endif
 	return res;
 }
 
Index: kernel/fuse_i.h
===================================================================
RCS file: /cvsroot/fuse/fuse/kernel/fuse_i.h,v
retrieving revision 1.99
retrieving revision 1.99.2.1
diff -u -r1.99 -r1.99.2.1
--- kernel/fuse_i.h	14 Jan 2006 14:47:21 -0000	1.99
+++ kernel/fuse_i.h	18 Jan 2006 12:17:33 -0000	1.99.2.1
@@ -40,6 +40,9 @@
 #  if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
 #    define KERNEL_2_6_13_PLUS
 #  endif
+#  if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+#    define KERNEL_2_6_16_PLUS
+#  endif
 #endif
 
 #include "config.h"


please apply asap
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-01-19 04:57:57 UTC
*** Bug 119533 has been marked as a duplicate of this bug. ***
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-01-19 04:58:07 UTC
*** Bug 119534 has been marked as a duplicate of this bug. ***
Comment 3 Patrizio Bassi 2006-01-19 05:28:45 UTC
i'm sorry for bugzilla spam, server had some problems and it always timed out.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-01-19 16:19:33 UTC
*** Bug 119617 has been marked as a duplicate of this bug. ***
Comment 5 Stefan Schweizer (RETIRED) gentoo-dev 2006-01-20 02:48:21 UTC
can you please attach a real patch file that works?
first hunk fails for me:


PATCH COMMAND:  patch -p0 -g0 --no-backup-if-mismatch < /usr/portage/sys-fs/fuse/files/fuse-2.6.16.patch

=============================
patching file kernel/file.c
Hunk #1 FAILED at 675.
1 out of 1 hunk FAILED -- saving rejects to file kernel/file.c.rej
patching file kernel/fuse_i.h
=============================
Comment 6 Patrizio Bassi 2006-01-20 02:55:01 UTC
That's the cvs commit Miklos sent to me.
have u stripped cvs formatting things?
if so, it should depends on white spaces/tabs.

i did manual patching, so didn't use patch tool.
Comment 7 Stefan Schweizer (RETIRED) gentoo-dev 2006-01-20 04:51:24 UTC
*** Bug 119676 has been marked as a duplicate of this bug. ***
Comment 8 Stefan Schweizer (RETIRED) gentoo-dev 2006-01-20 12:20:51 UTC
got it working, thanks.

Please attach patches next time to avoid such issues :)
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2006-04-23 15:25:21 UTC
*** Bug 131036 has been marked as a duplicate of this bug. ***