Bug 450209

Summary: use forked gfs1-specific lock modules
Product: Red Hat Enterprise Linux 5 Reporter: David Teigland <teigland>
Component: gfs-kmodAssignee: Abhijith Das <adas>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: bstevens, djansa, edamato, fdinitto, rpeterso, swhiteho, teigland
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 21:18:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
First draft: Merge gfs1-specific lock modules into gfs1
none
second attempt patch
none
upstream patch: lock modules patch + fixes to build gfs1 with upstream kernel none

Description David Teigland 2008-06-05 21:27:14 UTC
Description of problem:

Lock modules being forked for gfs1/gfs2.  Adding harness (locking.c)
to gfs1 for lock modules to use.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Abhijith Das 2008-07-14 05:30:08 UTC
Created attachment 311682 [details]
First draft: Merge gfs1-specific lock modules into gfs1

After discussing with Dave, here's my patch to port the lock modules for gfs1
into gfs-kernel. I was able to compile the code with this patch. Comments?

Comment 2 RHEL Program Management 2008-07-14 13:41:06 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 Abhijith Das 2008-07-31 19:11:39 UTC
Created attachment 313124 [details]
second attempt patch

The lock_dlm in gfs1 and the lock_dlm.ko (from gfs2-kmod) don't play along
nicely because both attempt to register a kset with the name "lock_dlm" in
sysfs causing sysfs to panic. This patch changes the name of the kset used by
gfs' lock_dlm to "lock_dlm_gfs"

Comment 4 Steve Whitehouse 2008-08-04 08:37:23 UTC
Is it possible to change the name of the kset (as per comment #3) without causing a user interface change? Does this imply any changes in gfs_controld for example?

Comment 5 Abhijith Das 2008-08-04 14:34:03 UTC
The kset_register function registers the kset under /sys/kernel/lock_dlm_gfs. (gfs2's lock_dlm gets registered as /sys/kernel/lock_dlm). Other than registering the kset and creating an empty directory with this name under /sys/kernel, kset_register doesn't do much else. (It was during this creation of /sys/kernel/lock_dlm that we had a conflict; kset_register would return -EEXIST)

All the filesystem-specific sysfs objects are created under /sys/fs/gfs/<clustername:fsname>/lock_module/ during mount and is unaffected by this change in kset_name.

Comment 6 Steve Whitehouse 2008-08-04 14:44:43 UTC
If nothing uses it, can't we just ditch it entirely then?

Comment 7 Abhijith Das 2008-08-04 14:59:03 UTC
That's the unfortunate part. kset_register() does 2 things:
1. register the kset internally so it keeps a definition of the kset
2. create the directory in /sys/kernel/

The functions that perform 1 and 2 are not exported individually; I couldn't get it to register the kset but not create the empty directory in /sys/kernel/

Comment 8 Steve Whitehouse 2008-08-04 15:06:14 UTC
What is the point of the kset if its just creating an empty directory and not related to the userland interface? Afaik a kset is just a container for related kobjects, so if there are none, why do we need a container for them? Maybe I'm missing something...

Comment 9 Abhijith Das 2008-08-10 22:12:02 UTC
Created attachment 313900 [details]
upstream patch: lock modules patch + fixes to build gfs1 with upstream kernel

This patch contains the lock modules patch (ported from the RHEL5 patch in comment #3) and the following fixes to make gfs1 build with Steve's git tree.

- change all instances of <asm/semaphore.h> to <linux/semaphore.h>
- change all calls to permission() to inode_permission()
- change all calls to remote_llseek() to generic_file_llseek_unlocked()

I have been able to successfully compile with the patch against Steve's git tree, insmod the gfs.ko module, and mount a nolock filesystem using it. I don't have a cluster running upstream bits, so I couldn't test the module in a cluster.

If nobody has objections to this patch, I'll check it in.

Comment 12 errata-xmlrpc 2009-01-20 21:18:30 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0132.html