Re: Trying to cause a writepage from commit_write?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 10/4/06, Mark Williamson <mark.williamson@xxxxxxxxxxxx> wrote:
Hi there,

I'm writing a custom filesystem that does not use a block device as it's
backing store.  I think it should be possible to arrange for a writepage to
be called at some point after a commit_write - for instance by just dirtying
the page and waiting for it to be flushed.

I've tried various methods for dirtying the page, but my writepage() method
never seems to get called.  I can't see anything obvious that I'm missing,
but most other filesystems end up calling into the block layer at some point,
so they don't correspond very well to what I'm trying to do.

Any suggestions or pointers would be greatly appreciated.

Well, given  the information  you provided it  is anyone's  guess, but
four things came into my mind at the moment:

1) Check that you have a  handler for the commit_write() address space
  operation.

2) Check  that  the  handler  marks  the  page  as  dirty  by  calling
  set_page_dirty().  Its variants like __set_page_dirty_buffers() and
  __set_page_dirty_nobuffers() may  also be ok but since  you are not
  block device based I don't  think you should be using buffer_heads.
  Specifically SetPageDirty() is NOT  enough because it does not mark
  the     page     dirty     in     the     mapping     tree     (See
  documentation/filesystems/Locking for other details).

3) If you have your own set_page_dirty() address space operation, make
  sure   it   does   the    right   thing   by   eventually   calling
  __set_page_dirty_nobuffers() (assuming you don't use buffer heads).

4) Check that  writepages() does not kick  in earlier and  does not do
  the job instead.

HTH

Martin Jambor
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux