All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3] fcntl/fcntl32.c: add F_SETLEASE and F_WRLCK argument test
Date: Wed, 7 Oct 2015 18:00:26 +0800	[thread overview]
Message-ID: <5614ED3A.10609@cn.fujitsu.com> (raw)
In-Reply-To: <20150930164132.GC8256@rei.suse.cz>

Hi!
Thanks for your reply.

On 2015/10/01 00:41, Cyril Hrubis wrote:
> Hi!
>> +int main(int ac, char **av)
>> +{
>> +	int lc;
>> +	int tc;
>> +	long type;
>> +
>> +	tst_parse_opts(ac, av, NULL, NULL);
>> +
>> +	setup();
>> +
>> +	switch ((type = tst_fs_type(cleanup, "."))) {
>> +	case TST_NFS_MAGIC:
>> +	case TST_RAMFS_MAGIC:
>> +	case TST_TMPFS_MAGIC:
>> +		tst_brkm(TCONF, cleanup, "%s filesystem does not support "
>> +			 "fcntl(2)'s F_SETLEASE operation",
>> +			 tst_fs_type_name(type));
>> +	default:
>> +		break;
>> +	}
> 
> Same as the second one. I would preffer figuring out that the fcntl() is
> unsupported by actually trying to use it.
> 

It will return EAGAIN when we actually use it, I don't think it's a reasonable errno,
since on ramfs or tmpfs, when opening or creating a new file, the dentry->d_count
will get an extra count to be 2 but not 1. Please have a look at the following link:
http://www.gossamer-threads.com/lists/linux/kernel/913113

I feel the expression is not clear, it should be "cannot do fcntl()'s F_SETLEASE operation
on %s filesystem"

> 
> Otherwise it looks fine.
> 

  reply	other threads:[~2015-10-07 10:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <55EFA462.5010608@cn.fujitsu.com>
2015-09-15  8:55 ` [LTP] [PATCH v3] fcntl/fcntl32.c: add F_SETLEASE and F_WRLCK argument test Guangwen Feng
2015-09-17  8:03   ` Jan Stancek
2015-09-30 16:41   ` Cyril Hrubis
2015-10-07 10:00     ` Guangwen Feng [this message]
2015-10-12 11:14       ` [LTP] [PATCH v4] " Guangwen Feng
2015-10-12 17:43       ` [LTP] [PATCH v3] " Cyril Hrubis
2015-10-13  3:56         ` [LTP] [PATCH v5] " Guangwen Feng
2015-10-13 18:23           ` Cyril Hrubis

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=5614ED3A.10609@cn.fujitsu.com \
    --to=fenggw-fnst@cn.fujitsu.com \
    --cc=ltp@lists.linux.it \
    /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.