From: "Deepa Chacko Pillai" <deepa.chacko@wipro.com>
To: linux-mm@kvack.org
Subject: Hang in filemap_fdatasync on SMP machine
Date: Thu, 10 Apr 2003 23:31:38 +0530 [thread overview]
Message-ID: <52C85426D39B314381D76DDD480EEE0CAA1B6B@blr-m3-msg.wipro.com> (raw)
Hi
I have written a kernel API to flush data to the disk. Whenever I call this API on an SMP machine, it causes the system to hang. The code looks like:
down(&inode->i_sem);
ret = filemap_fdatasync(inode->i_mapping);
err = file->f_op->fsync(file, dentry, 0);
if (err && !ret)
ret = err;
err = filemap_fdatawait(inode->i_mapping);
if (err && !ret)
ret = err;
up(&inode->i_sem);
This code works perfectly fine on uniprocessor systems. But it hangs in filemap_fdatasync on SMP systems. It goes in an infinite loop in filemap_fdatasync (). Inside filemap_fdatasync (), it finds that the page is not dirty and keeps going in a loop.
while (!list_empty(&mapping->dirty_pages)) {
struct page *page = list_entry(mapping->dirty_pages.prev, struct page, list);
list_del(&page->list);
list_add(&page->list, &mapping->locked_pages);
if (!PageDirty(page))
continue;
....
}
I am using Red Hat Linux with kernel version 2.4.19. Any help would be much appreciated.
Thanks
Deepa
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
reply other threads:[~2003-04-10 18:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=52C85426D39B314381D76DDD480EEE0CAA1B6B@blr-m3-msg.wipro.com \
--to=deepa.chacko@wipro.com \
--cc=linux-mm@kvack.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