From: "Scott Baker" <smbaker@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: fault when using iget() on XFS file system (2.6.9)
Date: Fri, 22 Sep 2006 16:42:41 -0700 [thread overview]
Message-ID: <35a82d00609221642u2e4a5026w434584ff77b7b9bb@mail.gmail.com> (raw)
Hello,
I'm working on a kernel module that needs to perform an iget() on an
inode that lies in the XFS file system. Most of the time, this works
fine, but occasionally the iget will cause a fault by jumping to
EIP=0. I traced the fault to where iget calls sb->s_op->read_inode,
and I found that XFS doesn't provide a read_inode function. iget
attempts to call the read_inode operation if the inode's state has the
I_NEW bit set. Thus, the kernel jumps off to nowhere.
The code works flawlessly on an uniprocessor system, but fails
intermittently under smp. This leads me to believe that there's a
race. XFS is probably filling in the inode structure on one cpu while
my module is performing the iget on the other.
Does anyone have a suggestion of where I should go from here?
Modifying XFS or the kernel is out of the question. I can re-implement
iget myself, detect the error condition, and sleep until XFS finishes
filling in the inode, but that seems like a bit of a hack.
Thanks,
Scott
next reply other threads:[~2006-09-22 23:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-22 23:42 Scott Baker [this message]
2006-09-22 23:49 ` Al Viro
2006-09-23 1:20 ` Scott Baker
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=35a82d00609221642u2e4a5026w434584ff77b7b9bb@mail.gmail.com \
--to=smbaker@gmail.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®