Bug#344036: kernel-source-2.4.27: Patch to solve XFS compilation issues on 2.4.27-12
Package: kernel-source-2.4.27
Version: 2.4.27-12
Followup-For: Bug #344036
It seems that in the last diff (kernel-source-2.4.27_2.4.27-12.diff.gz)
function xfs_iput_new() has been modified adding a call to vn_mark_bad()
Here is the fragment:
+@@ -582,6 +599,11 @@ xfs_iput_new(xfs_inode_t *ip,
+
+ vn_trace_entry(vp, "xfs_iput_new", (inst_t *)__return_address);
+
++ if ((ip->i_d.di_mode == 0)) {
++ ASSERT(!(ip->i_flags & XFS_IRECLAIMABLE));
++ vn_mark_bad(vp);
++ }
++
+ /* We shouldn't get here without this being true, but just in case */
+ if (inode->i_state & I_NEW) {
+ remove_inode_hash(inode);
The point is that vn_mark_bad(struct vnode *) is absent from 2.4.27-12 sources.
I propose a simple patch to define this function. Here it is:
--- /usr/src/kernel-source-2.4.27/fs/xfs/linux-2.4/xfs_vnode.h 2005-12-27 23:40:50.000000000 +0100
+++ /usr/src/kernel-source-2.4.27/fs/xfs/linux-2.4/xfs_vnode.h.new 2005-12-27 23:40:29.000000000 +0100
@@ -594,6 +594,23 @@ static __inline__ void vn_flagclr(struct
(LINVFS_GET_IP(vp)->i_ctime = (__int32_t)(tvp)->tv_sec)
/*
+ * Dealing with bad inodes
+ */
+static inline void vn_mark_bad(struct vnode *vp)
+{
+ struct inode *inode = LINVFS_GET_IP(vp);
+
+ remove_inode_hash(inode);
+ make_bad_inode(inode);
+}
+
+static inline int VN_BAD(struct vnode *vp)
+{
+ return is_bad_inode(LINVFS_GET_IP(vp));
+}
+
+
+/*
* Some useful predicates.
*/
#define VN_MAPPED(vp) ((LINVFS_GET_IP(vp)->i_mapping->i_mmap != NULL) || \
I have tested the patch and it seems to work (i.e. kernel compiles and behaves correctly, AFAIK).
BR,
F. Di Campo
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.4.30
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages kernel-source-2.4.27 depends on:
ii binutils 2.16.1cvs20051214-1 The GNU assembler, linker and bina
ii bzip2 1.0.2-11 high-quality block-sorting file co
ii coreutils [fileutils 5.2.1-2.1 The GNU core utilities
Versions of packages kernel-source-2.4.27 recommends:
ii gcc-3.3 1:3.3.6-10 The GNU C compiler
ii libc6-dev [libc-dev] 2.3.5-8 GNU C Library: Development Librari
ii make 3.80-11 The GNU version of the "make" util
-- no debconf information
Reply to: