[LU-2757] Move dynlocks out of ldiskfs Created: 05/Feb/13  Updated: 24/Sep/13  Resolved: 24/Sep/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.5.0

Type: Improvement Priority: Minor
Reporter: Jeff Mahoney Assignee: Bob Glossman (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Duplicate
is duplicated by LU-2564 move dynlock from ldiskfs to osd-ldiskfs Resolved
Rank (Obsolete): 6690

 Description   

Commit 43603bd1 (LU-1548 osd: move i_htree_lock to iam container) eliminated the use of dynlocks inside ldiskfs. Now that it's only used in the system-agnostic mdd and osd-ldiskfs code, we can move it under lustre/ and eliminate a patch we apply during build.



 Comments   
Comment by James A Simmons [ 06/Feb/13 ]

The mdd layer uses the dynlock code. How did it ever work on ZFS?

Comment by James A Simmons [ 06/Feb/13 ]

With the current patch the dynlock code in placed in lustre/dynlocks. Andreas where do recommend that it be placed in the tree? Would obdclass make a logical choice since this code is used by mdd and osd-ldiskfs layers?

Comment by Jeff Mahoney [ 06/Feb/13 ]

I was wondering that too when I was build testing and the mdd Makefile didn't have the proper include path. The mdd layer can use the dynlock code but isn't currently because MDD_DISABLE_PDO_LOCK is set. The comment indicates it's because it's already protected by the LDLM.

Comment by Bob Glossman (Inactive) [ 06/Feb/13 ]

Is it just me or is build of dynlocks.c failing to find dynlocks.h ?
Seems to be missing a -I in new lustre/dynlocks/Makefile.in

Comment by Jeff Mahoney [ 06/Feb/13 ]

My builds succeed but you're right, there should be a -I in there.

Comment by Bob Glossman (Inactive) [ 06/Feb/13 ]

The 1 line fix below seems to fix it for me.

--- a/lustre/dynlocks/Makefile.in
+++ b/lustre/dynlocks/Makefile.in
@@ -2,7 +2,7 @@ all: modules
 install: modules_install
 distdir:
 
-EXTRA_CFLAGS += -include @abs_top_builddir@/config.h
+EXTRA_CFLAGS += -include @abs_top_builddir@/config.h -I@abs_top_builddir@/lustre/dynlocks
 
 sources := dynlocks.c dynlocks.h

Comment by Jeff Mahoney [ 06/Feb/13 ]

I think that should probably be:

--- a/lustre/dynlocks/Makefile.in
+++ b/lustre/dynlocks/Makefile.in
@@ -2,7 +2,7 @@ all: modules
 install: modules_install
 distdir:
 
-EXTRA_CFLAGS += -include @abs_top_builddir@/config.h
+EXTRA_CFLAGS += -include @abs_top_builddir@/config.h -I@abs_srcdir@
 
 sources := dynlocks.c dynlocks.h
Comment by Bob Glossman (Inactive) [ 08/Feb/13 ]

If dynlocks is going to be a whole new kernel module as proposed in the patch, then it will need some work to be dealt with properly in various tools like 'lctl modules' and lustre_rmmod.

Comment by James A Simmons [ 11/Feb/13 ]

Yuck. Where this code goes depends on if the mdd layer will ever use dynlock. If it wouldn't then it can be moved to osd-ldiskfs. If dynlock will be used with mdd then I suggest it go into the obdclass.

Comment by Jeff Mahoney [ 11/Feb/13 ]

Ok, it makes sense to add it to an already existing dependency of both oxd-ldiskfs and mdd. I'll update the patch to move it to obdclass.

Comment by James A Simmons [ 20/May/13 ]

Updated the patch Alex as you suggested. Now that 2.4 is frozen we can label this a 2.5 item

Comment by Andreas Dilger [ 16/Sep/13 ]

http://review.whamcloud.com/5282

Comment by James A Simmons [ 24/Sep/13 ]

This patch has just landed. Peter you can close this ticket.

Generated at Sat Feb 10 01:27:56 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.