All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Mitch Williams <mitch.a.williams@intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] buffer writes to sysfs
Date: Mon, 24 Jan 2005 13:39:06 -0800	[thread overview]
Message-ID: <20050124213906.GE18933@kroah.com> (raw)
In-Reply-To: <Pine.CYG.4.58.0501241016430.3748@mawilli1-desk2.amr.corp.intel.com>

On Mon, Jan 24, 2005 at 10:37:00AM -0800, Mitch Williams wrote:
> 
> 
> On Sat, 22 Jan 2005, Greg KH wrote:
> 
> >
> > On Fri, Jan 21, 2005 at 02:52:29PM -0800, Mitch Williams wrote:
> > > This patch buffers writes to sysfs files and flushes them to the
> > kobject
> > > owner when the file is closed.
> >
> > Why?  This breaks the way things work today, right?
> >
> > What is this patch trying to fix?
> >
> 
> To be honest, I'm a bit ambivalent about this patch.  I wrote this code in
> response to a bug filed by our test lab.  If you write a bunch (e.g. > 1K)
> of data to a sysfs file, the c library splits it up into multiple writes
> of 1K or less.  Because the kobject store method doesn't support offsets,
> and because the call to copy_from_user doesn't honor offsets, you end up
> with multiple calls to the store method, with incorrect results and no
> error code.

Who is trying to send > 1K to a sysfs file?  Remember, sysfs files are
for 1 value only.  If you consider > 1K a "single value" please point me
to that part of the kernel that does that.

> To the typical user, there's really no difference in behavior, unless you
> are writing a ton of data into the file.  Of course, there's the obvious
> question of why you'd want to do so...

Exactly, you should not be doing that anyway.  So, because of that, I
really don't want/like this patch.

thanks,

greg k-h

  reply	other threads:[~2005-01-24 21:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-21 22:52 [PATCH 2/3] buffer writes to sysfs Mitch Williams
2005-01-22  8:09 ` Greg KH
2005-01-24 18:37   ` Mitch Williams
2005-01-24 21:39     ` Greg KH [this message]
2005-01-25 23:39       ` Mitch Williams
2005-01-27 18:28         ` Bill Davidsen
2005-02-01  6:30         ` Greg KH

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=20050124213906.GE18933@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitch.a.williams@intel.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.