All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Marchand <jmarchan@redhat.com>
To: Pavel Emelyanov <xemul@parallels.com>
Cc: Matthew Wilcox <matthew@wil.cx>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] procfs: fix numbering in /proc/locks
Date: Wed, 29 Sep 2010 13:52:47 +0200	[thread overview]
Message-ID: <4CA3288F.4030200@redhat.com> (raw)
In-Reply-To: <4CA32677.2020203@parallels.com>

On 09/29/2010 01:43 PM, Pavel Emelyanov wrote:
>> Good point. My implementation is definitely wrong. But I'm afraid that
>> moving the increment in locks_next() won't help either. It will fail when
>> a program do something more than just read the file sequentially (use
>> of lseek() for instance). We need a better way to keep track of the
>> current position in the list.
> 
> The seq files core implementation knows about the lseek and
> calls the seq_ops callbacks properly.
> 

Yes, but if read a few lines and then lseek() back. I'm afraid it will call
a few more locks_next() function and thus increase the counter again.

  reply	other threads:[~2010-09-29 11:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-27 15:13 [PATCH] procfs: fix numbering in /proc/locks Jerome Marchand
2010-09-27 15:24 ` Pavel Emelyanov
2010-09-29 11:42   ` Jerome Marchand
2010-09-29 11:43     ` Pavel Emelyanov
2010-09-29 11:52       ` Jerome Marchand [this message]
2010-09-29 11:56         ` Pavel Emelyanov
2010-09-29 12:00           ` Jerome Marchand

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=4CA3288F.4030200@redhat.com \
    --to=jmarchan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=xemul@parallels.com \
    /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.