From: kumar.srivastava.pranay@gmail.com (Pranay Srivastava)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Fwd: Need some help regarding write_begin, write_end and writepage(s).
Date: Thu, 29 Dec 2016 12:35:52 +0530 [thread overview]
Message-ID: <CAH4T7JiJDxpUVVu-Ficn6-b7eeDAdChDuWi_swZO+91E8aCCNQ@mail.gmail.com> (raw)
In-Reply-To: <CAH4T7JgwBN+MsfXv3pRsgSY8LSWy3MmXumFL2PgK42Knrm3fqg@mail.gmail.com>
Hello,
I'm trying to understand the write_begin, write_end and writepages /
writepage call
sequence by having a small file system coded myself.
I'm not using block_write_begin / block_write_end also not using
mpage_writepages
as well.
The issue however is that apart from write_begin and write_end, writepages never
gets called. However if I do write_inode_now ( in write_end) then writepage do
get called, but that's not how it's supposed to be.
1. in write_begin : I'm able to grab_cache_page_begin and returned it locked.
2. in write_end: I'm able to allocate disk space and do SetPageDirty
and SetPageUptodate
unlock_page and page_cache_release.
3. I also tried __mark_inode_dirty(inode, I_DIRTY_PAGES)
4. I also tried to set_page_writeback, but apparently that then makes
the iput_final stuck since
it waits for PG_Writeback to be cleared and that I've coded in
writepage which never
gets called.
but writepages never gets called.
Even iput_final doesn't make the write_inode_now call.
Any help would be appreciated.
Regards,
next parent reply other threads:[~2016-12-29 7:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAH4T7JgwBN+MsfXv3pRsgSY8LSWy3MmXumFL2PgK42Knrm3fqg@mail.gmail.com>
2016-12-29 7:05 ` Pranay Srivastava [this message]
[not found] ` <102048.1483471700@turing-police.cc.vt.edu>
2017-01-04 6:33 ` Fwd: Need some help regarding write_begin, write_end and writepage(s) Pranay Srivastava
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=CAH4T7JiJDxpUVVu-Ficn6-b7eeDAdChDuWi_swZO+91E8aCCNQ@mail.gmail.com \
--to=kumar.srivastava.pranay@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).