Skip to contentSkip to conversation

PROBLEM: No dentry alias for page host in writepage.

DISCUSSION Frank Schruefer 1 participant 1 message Jun 30, 2005

lore
Share & tools
lore
#0 lore raw

Hy,

There is some rare case which hits me aprox. once in a million writepage calls where for the page handed over there can not be get a connected dentry of its inode host (via i_dentry).

Unluckily I'm absolutely depending on at least one alias at that point and I'm not able to implement the export filesystem functions because for implementing the get_name etc... functions I'd already need the dentry to contain the valid name. Hence reconnecting is out of the question.

It seems not to be possible to circumvent that situation by just making the d_delete dentry operations function returning 0 if the inode is dirty or has dirty pages (mapping_tagged ... PAGECACHE_TAG_DIRTY).

I programmed a really ugly workaround dget'ing an alias as soon as I dirty an inode and dput it as soon as the last page is writepage'd - that works for now - but I really hate it and it seems to be memory leak prone (why I'd still have to find out) and having possible side effects with rename and unlink ...

My question is why are the dentries/aliases dropped/disconnected if the inode is still dirty or it's pages are under writeout and why am I not asked via d_delete or have any other option to deny dropping/disconnecting the dentry/aliases? Is this a bug?
What could I do?

Until now I just have that ugly workaround - please make my day, someone, please ;-)

Signature · 4 lines
Thanks,
   Frank Schruefer
   SITEFORUM Software Europe GmbH
   Germany (Thuringia)