All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Reed <mdr@sgi.com>
To: Peter Staubach <staubach@redhat.com>
Cc: Hua Zhong <hzhong@gmail.com>,
	linux-kernel@vger.kernel.org, hugh@veritas.com,
	hch@infradead.com, kenneth.w.chen@intel.com, akpm@osdl.org,
	torvalds@osdl.org
Subject: Re: [PATCH] support O_DIRECT in tmpfs/ramfs
Date: Tue, 09 Jan 2007 11:17:24 -0600	[thread overview]
Message-ID: <45A3CE24.7080706@sgi.com> (raw)
In-Reply-To: <45A3B529.80402@redhat.com>



Peter Staubach wrote:
> Hua Zhong wrote:
>> Hi,
>>
>> A while ago there was a discussion about supporting direct-io on tmpfs.
>>
>> Here is a simple patch that does it.
>>
>> 1. A new fs flag FS_RAM_BASED is added and the O_DIRECT flag is ignored
>>    if this flag is set (suggestions on a better name?)
>>
>> 2. Specify FS_RAM_BASED for tmpfs and ramfs.
>>
>> 3. When EINVAL is returned only a fput is done. I changed it to go
>>    through cleanup_all. But there is still a cleanup problem:
>>
>>   If a new file is created and then EINVAL is returned due to O_DIRECT,
>>   the file is still left on the disk. I am not exactly sure how to fix
>>   it other than adding another fs flag so we could check O_DIRECT
>>   support at a much earlier stage. Comments on how to fix it?
> 
> This would seem to create two different sets of O_DIRECT semantics,
> wouldn't it?  I think that it would be possible to develop an application
> using one of these FS_RAM_BASED file systems as the testbed, but then be
> surprised when the application failed to work on other file systems such
> as ext3.

As I'm ignorant with regard to what is needed for "compliant"
support of O_DIRECT on tmpfs, what are the issues with actually implementing
the proper semantics, including the alignment and any transfer length
restrictions?

My $.02 is that the implementation should be fully compliant with the
current semantics or it shouldn't be implemented.  And I think it should
be implemented.

Mike

> 
>       ps
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 

  reply	other threads:[~2007-01-09 17:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-09  1:43 [PATCH] support O_DIRECT in tmpfs/ramfs Hua Zhong
2007-01-09  1:51 ` Jan Engelhardt
2007-01-09 15:30 ` Peter Staubach
2007-01-09 17:17   ` Michael Reed [this message]
2007-01-09 20:44 ` Hugh Dickins
2007-01-09 21:57   ` Hua Zhong
2007-01-10  8:20     ` Aubrey

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=45A3CE24.7080706@sgi.com \
    --to=mdr@sgi.com \
    --cc=akpm@osdl.org \
    --cc=hch@infradead.com \
    --cc=hugh@veritas.com \
    --cc=hzhong@gmail.com \
    --cc=kenneth.w.chen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=staubach@redhat.com \
    --cc=torvalds@osdl.org \
    /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.