From: Chuck Ebbert <76306.1226@compuserve.com>
To: Orion Poplawski <orion@cora.nwra.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
linux-kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: fctnl(F_SETSIG) no longer works in 2.6.17, does in 2.6.16.
Date: Mon, 31 Jul 2006 02:21:58 -0400 [thread overview]
Message-ID: <200607310224_MC3-1-C689-D6DD@compuserve.com> (raw)
In-Reply-To: <eabdhq$nca$1@sea.gmane.org>
On Thu, 27 Jul 2006 16:08:53 -0600, Orion Poplawski wrote:
>
> fctnl(F_SETSIG) no longer works in 2.6.17, does in 2.6.16.
>
> The attached program (oplocktest.c) illustrates.
I added some debug statements to your code:
=> printf("before setlease: signal number = %d\n", fcntl(fd, F_GETSIG));
ret = fcntl(fd, F_SETLEASE, leasetype);
if (ret == -1 && errno == EACCES) {
set_capability(CAP_LEASE);
ret = fcntl(fd, F_SETLEASE, leasetype);
}
=> printf("after setlease: signal number = %d\n", fcntl(fd, F_GETSIG));
And I get:
before setlease: signal number = 34
after setlease: signal number = 0
So the fcntl(F_SETLEASE) is resetting the signal number. I don't think
it's supposed to do that.
That seems to be caused by:
| From: Trond Myklebust <Trond.Myklebust@netapp.com>
| Date: Mon, 20 Mar 2006 18:44:05 +0000 (-0500)
| Subject: VFS: Fix __posix_lock_file() copy of private lock area
| X-Git-Tag: v2.6.17-rc1
| X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=47831
|
| VFS: Fix __posix_lock_file() copy of private lock area
|
| The struct file_lock->fl_u area must be copied using the fl_copy_lock()
| operation.
In this change:
| */
| void locks_copy_lock(struct file_lock *new, struct file_lock *fl)
| {
|+ locks_release_private(new);
|+
| new->fl_owner = fl->fl_owner;
| new->fl_pid = fl->fl_pid;
| new->fl_file = fl->fl_file;
Which ends up calling this:
static void lease_release_private_callback(struct file_lock *fl)
{
if (!fl->fl_file)
return;
f_delown(fl->fl_file);
=> fl->fl_file->f_owner.signum = 0;
}
I'm not sure how to fix it, though (if that's really the problem, but I
think it is.)
--
Chuck
next reply other threads:[~2006-07-31 6:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-31 6:21 Chuck Ebbert [this message]
2006-07-31 18:23 ` Trond Myklebust
2006-08-01 14:51 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2006-08-08 5:38 Beschorner Daniel
2006-08-08 13:26 ` Trond Myklebust
2006-08-09 8:39 ` Beschorner Daniel
2006-07-27 22:08 Orion Poplawski
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=200607310224_MC3-1-C689-D6DD@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orion@cora.nwra.com \
--cc=trond.myklebust@fys.uio.no \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®