All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Joe Thornber <joe@fib011235813.fsnet.co.uk>
Cc: Andrew Morton <akpm@digeo.com>,
	lvm-devel@sistina.com, linux-kernel@vger.kernel.org
Subject: Re: dmfs for 2.5.51
Date: Fri, 13 Dec 2002 09:32:09 -0800	[thread overview]
Message-ID: <20021213173209.GC27800@kroah.com> (raw)
In-Reply-To: <20021213095806.GC1117@reti>

On Fri, Dec 13, 2002 at 09:58:06AM +0000, Joe Thornber wrote:
> On Thu, Dec 12, 2002 at 09:25:51PM -0800, Greg KH wrote:
> > On Thu, Dec 12, 2002 at 05:50:01PM -0800, Andrew Morton wrote:
> > > hm.  The whole thing seems hokey to me.  Not sure why.
> > 
> > I agree.  It doesn't feel right.  I mean, doing a mkdir(1) to create a
> > device, which causes files to be created automagically in that
> > directory?  Something needs to change here, and I proposed a single file
> > to write to that creates the device, but was shot down by the author.
> 
> Greg, I didn't mean to make it sound like I was shooting you down, I
> just said that we'd leave it as it was for now.

Sorry, I didn't mean it that way.  I understand and was trying to reach
more people.  Looks like I succeded :)

> Having written the
> code I wanted a bit more feedback.  When I started writing the fs
> interface a couple of people expressed concerns that I should try and
> map things properly onto fs semantics and not just create a single
> file.  Given Andrews comment I guess I haven't done a good job.  Could
> you flesh out your single file idea a bit more please, there's a lot
> of functionality to shoe horn in there.

Ok, I'll go work on that and see how it turns out.

> > > > ...
> > > > +  echo -e "0 56 linear /dev/hda3 0\n56 102344 linear /dev/hda4 0" > table
> > > 
> > > Maybe this is why.
> > 
> > Heh, yeah, welcome to parsers in the kernel :)
> > But the dm code today does much the same thing with ioctls, passing a
> > string down to the loaded modules below it.  So there is a bit of
> > president.  Even if it is ugly :)
> 
> y, the dm targets have always accepted their arguments as ascii
> strings.  So the file system interface just adds code to split the
> input into lines, and then sscanf the first three elements of the line
> - this is probably less code than the marshalling of binary data that
> is done in the ioctl interface.
> 
> I see the fact that we're using ascii data as being the big advantage
> of the fs interface, which neccessarily means doing a small amount of
> parsing in kernel.  You can't have things both ways.

I agree, I like the interface.  It's just a little strange the first
time you see it.

> > > > ...
> > > > +static struct page *find_page(struct dmfs_file *f, loff_t len, int fill)
> > > 
> > > This is called under spinlock.
> > > 
> > > > ...
> > > > +                       void *addr = (void *) __get_free_page(GFP_KERNEL);
> > > 
> > > whoops.
> 
> My fault :(
> 
> > Nice catch.  I'm not sure that the find_page(), __io() and friends
> > functions are really needed at all.
> 
> It would be nice to get rid of them, what shall we replace them with ?

Something like only creating one page as I did in the dev file, or the
seq_file interface.  I'll play around with the sizes of the files to see
how to fix this up.

thanks,

greg k-h

  reply	other threads:[~2002-12-13 17:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-13  1:26 dmfs for 2.5.51 Greg KH
     [not found] ` <3DF93CC9.979CA988@digeo.com>
2002-12-13  5:25   ` Greg KH
2002-12-13  9:58     ` Joe Thornber
2002-12-13 17:32       ` Greg KH [this message]
2002-12-13  9:37 ` Joe Thornber
2002-12-13 17:29   ` Greg KH
2002-12-13 17:43     ` Joe Thornber

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=20021213173209.GC27800@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@digeo.com \
    --cc=joe@fib011235813.fsnet.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvm-devel@sistina.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.