From: Robert W. <ro...@us...> - 2005-05-26 19:32:31
|
Roman, Below is some info from the test author regarding fcntl23. Apparently, you may be encountering a bug depending on your kernel level. -Robbie <ro...@us...> ----- Forwarded by Robert Williamson/Austin/IBM on 05/26/2005 02:29 PM ----- Jacky Malcles <Jac...@bu...> wrote on 05/20/2005 01:54:18 AM: > Hi Prashant, > > wanna let you know this: > > 1) > Note: forwarded message folling > > from Ricky Ng-Adam > Hello! > > This was the answer from Linus Torvalds. Really, there seems to have > been a bug but I never had time to follow up on it. Have you tried with > the latest kernels? I thought there had been changes around those > pieces the code in more recent kernels. > > Good luck, > > Note: forwarded message attached. > > > __________________________________________________ > Subject: > Re: Fw: [2.6.10-rc3:fs/locks.c] fcntl F_SETLEASE/[ F_WRLCK| F_RDLCK] > inconsistencies > From: > Linus Torvalds <tor...@os...> > Date: > Tue, 7 Dec 2004 18:52:42 -0800 (PST) > To: > Andrew Morton <ak...@os...> > CC: > an...@th..., Ricky Ng-Adam <rn...@ya...>, Matthew Wilcox > <wi...@de...> > > On Tue, 7 Dec 2004, Andrew Morton wrote: > > >> Thoughts? > >> > > Well, The "0" can definitely not be just changed to a "1" for the > i_writecount check, but maybe something like > > int maxwrites = (file->f_mode & FMODE_WRITE) ? 1 : 0; > > if (arg == F_RDLCK && atomic_read(&inode->i_writecount) > maxwrites) > ... > > might work. > > Who uses F_SETLEASE? Just the samba/NFSv4 servers? It really should be up > to those, unless there are other real users.. > > Linus > __________________________________________________ > > ======================================================================== > > 2) > > I did a try on a 2.6.12-rc4 kernel and noted: > open() | lease requested > flag | F_RDLCK | F_WRLCK > ---------+----------+---------- > O_RDONLY | okay | okay > O_WRONLY | EAGAIN | okay > O_RDWR | EAGAIN | okay > > seems that the implementation does not include the related patch... > > 3) > > there are reasons, for details: > see on kernel.org the discussioon > as example from J.Bruce Fielsd <bf...@fi...> > " > On Tue, May 03, 2005 at 12:21:24PM -0400, William A.(Andy) Adamson wrote: > > >> the other side of the coin would be break_lease. > > > Yeah, I'm a little confused as to why anyone would have the expectation > that read leases would not conflict with write opens by the same > process, given that break_lease() has never functioned that way, so > later write opens by the same process have always broken any read lease. > > Are there applications that actually depend on the old behaviour? Is > there any documentation that blesses it? All I can find is the fcntl > man page, and as far as I can tell an implementation that makes read > leases conflict with all write opens (by the same process or not) is > consistent with that man page. > > --b." > > ======================================================================== > > so what of having 3 Testcases? > > fcntl23 - O_RDWR > fcntl27 -> O_RDONLY > fcntl28 -> O_WRONLY > > regards. > Jacky > > > > > > pra...@wi... wrote: > > > > In addition to this I am testing this on 2.6.8 kernel (NFS mounted one), > > where I think the concept of F_FDLOCK has been changed a bit. > > > > My RHEL 3 and fedora are 2.4.X kernels > > > > Regards, > > Prashant P Yendigeri, > > WindRiver ODC, > > Tower 7 'c' wing,Electronic city, > > Bangalore > > Ext : 6732 > > > > -----Original Message----- > > From: Prashant Yendigeri (WT01 - EMBEDDED & PRODUCT ENGINEERING > > SOLUTIONS) > > Sent: Friday, May 20, 2005 10:18 AM > > To: 'Jacky Malcles' > > Subject: RE: fcntl23 TC > > > > Hello Jacky, > > I am testing this on RHEL 3 and Fedora.Well on these fcntl23 passes > > without a hitch.But I have built my own kernel and rootfs and running on > > intel (P4) board, mounted via NFS. Here it is failing.Do you see any NFS > > issues here ? > > or > > we can leave test code as it is. > > > > Thanks. > > > > Regards, > > Prashant P Yendigeri, > > WindRiver ODC, > > Tower 7 'c' wing,Electronic city, > > Bangalore > > Ext : 6732 > > > > -----Original Message----- > > From: Jacky Malcles [mailto:Jac...@bu...] > > Sent: Thursday, May 19, 2005 8:49 PM > > To: Prashant Yendigeri (WT01 - EMBEDDED & PRODUCT ENGINEERING SOLUTIONS) > > Cc: ro...@us... > > Subject: fcntl23 TC > > > > Prashant, > > > > If you agree, > > I suggest that fcntl23 remains opening the file with O_RDWR flag > > > > and instead of checking if it's getting a F_RDLCK.. > > checking of the errno that is returned.. > > > > > > regards, > > > > -- > > Jacky Malcles B1-403 Email : Jac...@bu... > > Bull SA, 1 rue de Provence, B.P 208, 38432 Echirolles CEDEX, FRANCE > > Tel : 04.76.29.73.14 > > > > > > > > Confidentiality Notice > > > > The information contained in this electronic message and any > attachments to this message are intended > > for the exclusive use of the addressee(s) and may contain > confidential or privileged information. If > > you are not the intended recipient, please notify the sender at > Wipro or Mai...@wi... immediately > > and destroy all copies of this message and any attachments. > > > > > -- > Jacky Malcles B1-403 Email : Jac...@bu... > Bull SA, 1 rue de Provence, B.P 208, 38432 Echirolles CEDEX, FRANCE > Tel : 04.76.29.73.14 |