linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Jijiagang <jijiagang@hisilicon.com>
Cc: Hujianyang <hujianyang@huawei.com>,
	"dedekind1@gmail.com" <dedekind1@gmail.com>,
	Caizhiyong <caizhiyong@hisilicon.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"Wanli (welly)" <welly.wan@hisilicon.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>
Subject: Re: UBIFS assert failed in ubifs_set_page_dirty at 1421
Date: Mon, 24 Nov 2014 11:10:24 +0200	[thread overview]
Message-ID: <20141124091024.GA1190@node.dhcp.inet.fi> (raw)
In-Reply-To: <BE257DAADD2C0D439647A27133296657394A65A4@SZXEMA511-MBS.china.huawei.com>

On Mon, Nov 24, 2014 at 02:59:51AM +0000, Jijiagang wrote:
> Hi Kirill,
> 
> I add dump_page(page) in function ubifs_set_page_dirty.
> And get this log when ubifs assert fail. Is it helpful for this problem?

Not really. It seems you called dump_page() after
__set_page_dirty_nobuffers() in ubifs_set_page_dirty().

Could you try something like patch below. It assumes ubifs to compiled in
(not module).

diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index b5b593c45270..7b4386dd174e 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1531,7 +1531,7 @@ out_unlock:
        return err;
 }
 
-static const struct vm_operations_struct ubifs_file_vm_ops = {
+const struct vm_operations_struct ubifs_file_vm_ops = {
        .fault        = filemap_fault,
        .map_pages = filemap_map_pages,
        .page_mkwrite = ubifs_vm_page_mkwrite,
diff --git a/mm/rmap.c b/mm/rmap.c
index 19886fb2f13a..343c4571df68 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1171,8 +1171,15 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
        pteval = ptep_clear_flush(vma, address, pte);
 
        /* Move the dirty bit to the physical page now the pte is gone. */
-       if (pte_dirty(pteval))
+       if (pte_dirty(pteval)) {
+               extern const struct vm_operations_struct ubifs_file_vm_ops;
+               if (vma->vm_ops == &ubifs_file_vm_ops) {
+                       dump_vma(vma);
+                       dump_page(page, __func__);
+                       pr_emerg("pte_write: %d\n", pte_write(pteval));
+               }
                set_page_dirty(page);
+       }
 
        /* Update high watermark before we lower rss */
        update_hiwater_rss(mm);
-- 
 Kirill A. Shutemov

--
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:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2014-11-24  9:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BE257DAADD2C0D439647A271332966573949EFEC@SZXEMA511-MBS.china.huawei.com>
     [not found] ` <1413805935.7906.225.camel@sauron.fi.intel.com>
     [not found]   ` <C3050A4DBA34F345975765E43127F10F62CC5D9B@SZXEMA512-MBX.china.huawei.com>
2014-10-20 13:11     ` UBIFS assert failed in ubifs_set_page_dirty at 1421 Artem Bityutskiy
2014-10-21  2:30       ` Jijiagang
2014-10-21  3:38       ` Dave Chinner
2014-10-21  8:41         ` Jijiagang
2014-11-06  8:28       ` Jijiagang
2014-11-07  2:22       ` hujianyang
2014-11-20 12:30         ` Kirill A. Shutemov
2014-11-24  2:59           ` Jijiagang
2014-11-24  9:10             ` Kirill A. Shutemov [this message]
2014-11-24 10:20               ` Jijiagang
2014-11-24 13:27                 ` Kirill A. Shutemov

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=20141124091024.GA1190@node.dhcp.inet.fi \
    --to=kirill@shutemov.name \
    --cc=adrian.hunter@intel.com \
    --cc=caizhiyong@hisilicon.com \
    --cc=dedekind1@gmail.com \
    --cc=hujianyang@huawei.com \
    --cc=jijiagang@hisilicon.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=welly.wan@hisilicon.com \
    /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).