From: mfty45@dial.pipex.com
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] LVM2 on 2.4.22. (Fedora core 1 with nptl)
Date: Wed Nov 26 08:57:20 2003 [thread overview]
Message-ID: <1069800061.3fc3da7d2b6db@netmail.pipex.net> (raw)
In-Reply-To: <014d01c3b2f8$be15a930$100119ac@hydro>
Thanks Lucca and others for responding to my previous request for help.
I am now trying to apply the kernel patches to Fedora Core 1 (2.4.22-
1.2115.nptl). I am using the latest version, downloaded from the sistina.com
web site (device-mapper-1.00.07 and LVM2.2.00.08). I have massaged the ioctl
patches, as suggested, and they have applied successfully. There were a few
mismatches, but they were obvious and easily resolved.
Doing a patch --dry-run -Np1... of thelinux-2.4.22- VFS-lock patch I get this:
patching file drivers/md/lvm.c
Reversed (or previously applied) patch detected! Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file drivers/md/lvm.c.rej
However, when I look at the source code, this patch is NOT applied - at least
the way I understand it. I have included both the patch and the relevant
snippets from the source code below. I would appreciate it if someone can
confirm for me that my understanding is correct and that the patch program is
lying to me. In applying the ioctl patches when it told me some of the patches
were already applied I checked and they were, so I don't understand why it
would get it wrong now! If my understanding is correct and the patch has not
been applied, I will make the changes to the source manually. If anyone has any
better ideas or explanations I would appreciate hearing them.
Thanks in advance for your help.
P.S. When (if) I get all the patches in, a compiled and bootable kernel and LVM
seems to be working, I am happy to do a diff between the two kernel source
trees to create patches for Fedora Core 1, if that would be of interest. Never
created patches before, so I may need some help. Also, any use of the patches
would be at your own risk, etc.
The patch in the linux.2.4.22-VFS-lock.patch file is:
===== drivers/md/lvm.c 1.19 vs edited =====
--- 1.19/drivers/md/lvm.c Wed Feb 5 21:53:36 2003
+++ edited/drivers/md/lvm.c Mon Jun 2 14:19:16 2003
@@ -229,9 +229,6 @@
#define DEVICE_OFF(device)
#define LOCAL_END_REQUEST
-/* lvm_do_lv_create calls fsync_dev_lockfs()/unlockfs() */
-/* #define LVM_VFS_ENHANCEMENT */
-
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@ -2171,12 +2168,8 @@
if (lv_ptr->lv_access & LV_SNAPSHOT) {
lv_t *org = lv_ptr->lv_snapshot_org, *last;
- /* sync the original logical volume */
- fsync_dev(org->lv_dev);
-#ifdef LVM_VFS_ENHANCEMENT
/* VFS function call to sync and lock the filesystem */
fsync_dev_lockfs(org->lv_dev);
-#endif
down_write(&org->lv_lock);
org->lv_access |= LV_SNAPSHOT_ORG;
@@ -2201,11 +2194,9 @@
else
set_device_ro(lv_ptr->lv_dev, 1);
-#ifdef LVM_VFS_ENHANCEMENT
/* VFS function call to unlock the filesystem */
if (lv_ptr->lv_access & LV_SNAPSHOT)
unlockfs(lv_ptr->lv_snapshot_org->lv_dev);
-#endif
lvm_gendisk.part[MINOR(lv_ptr->lv_dev)].de =
lvm_fs_create_lv(vg_ptr, lv_ptr);
The relevant snipets from the source file are:
Hunk 1:
#define DEVICE_OFF(device)
#define LOCAL_END_REQUEST
/* lvm_do_lv_create calls fsync_dev_lockfs()/unlockfs() */
#define LVM_VFS_ENHANCEMENT
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
Hunk 2:
if (lv_ptr->lv_access & LV_SNAPSHOT) {
lv_t *org = lv_ptr->lv_snapshot_org, *last;
/* sync the original logical volume */
fsync_dev(org->lv_dev);
#ifdef LVM_VFS_ENHANCEMENT
/* VFS function call to sync and lock the filesystem */
fsync_dev_lockfs(org->lv_dev);
#endif
down_write(&org->lv_lock);
org->lv_access |= LV_SNAPSHOT_ORG;
Hunk 3:
else
set_device_ro(lv_ptr->lv_dev, 1);
#ifdef LVM_VFS_ENHANCEMENT
/* VFS function call to unlock the filesystem */
if (lv_ptr->lv_access & LV_SNAPSHOT)
unlockfs(lv_ptr->lv_snapshot_org->lv_dev);
#endif
lvm_gendisk.part[MINOR(lv_ptr->lv_dev)].de =
lvm_fs_create_lv(vg_ptr, lv_ptr);
next prev parent reply other threads:[~2003-11-26 8:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-24 20:08 [linux-lvm] LVM2 on 2.4.22. (Fedora core 1 with nptl) <hYdRo>
2003-11-25 16:37 ` <hYdRo>
2003-11-26 8:57 ` mfty45 [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-11-21 7:17 tugg
2003-11-21 13:00 ` Luca Berra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1069800061.3fc3da7d2b6db@netmail.pipex.net \
--to=mfty45@dial.pipex.com \
--cc=linux-lvm@sistina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.