Bug 16122

Summary: 2.6.35-rc1: WARNING at fs/fs-writeback.c:1142 __mark_inode_dirty+0x103/0x170
Product: File System Reporter: Larry Finger (Larry.Finger)
Component: ext3Assignee: fs_ext3 (fs_ext3)
Status: CLOSED DUPLICATE    
Severity: normal CC: akpm, axboe, maciej.rutecki, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.35-rc1-00324-gad84563 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 16055    

Description Larry Finger 2010-06-04 13:18:41 UTC
On booting, I get the following:

[   16.480278] ------------[ cut here ]------------
[   16.480288] WARNING: at fs/fs-writeback.c:1142 __mark_inode_dirty+0x103/0x170()
[   16.480291] Hardware name: HP Pavilion dv2700 Notebook PC
[   16.480293] Modules linked in: loop(+) dm_mod ide_cd_mod cdrom snd_hda_codec_conexant arc4 ecb b43 ide_pci_generic rng_core mac80211 cfg80211 rfkill snd_hda_intel led_class snd_hda_codec ssb snd_pcm mmc_core snd_timer amd74xx pcmcia k8temp snd i2c_nforce2 ide_core soundcore serio_raw hwmon sg pcmcia_core joydev snd_page_alloc forcedeth i2c_core ac battery button ext3 jbd mbcache ohci_hcd sd_mod ehci_hcd usbcore fan processor ahci libahci libata scsi_mod thermal
[   16.480344] Pid: 2432, comm: udisks-part-id Not tainted 2.6.35-rc1-Linus-00324-gad84563 #202
[   16.480347] Call Trace:
[   16.480354]  [<ffffffff8104623a>] warn_slowpath_common+0x7a/0xb0
[   16.480358]  [<ffffffff81046285>] warn_slowpath_null+0x15/0x20
[   16.480362]  [<ffffffff81128f53>] __mark_inode_dirty+0x103/0x170
[   16.480367]  [<ffffffff8111d6cd>] touch_atime+0x12d/0x170
[   16.480372]  [<ffffffff810ca131>] generic_file_aio_read+0x5c1/0x720
[   16.480377]  [<ffffffff810e49d8>] ? handle_mm_fault+0x718/0x8b0
[   16.480381]  [<ffffffff81107302>] do_sync_read+0xd2/0x110
[   16.480387]  [<ffffffff8107ab85>] ? trace_hardirqs_on_caller+0x145/0x190
[   16.480391]  [<ffffffff8107abdd>] ? trace_hardirqs_on+0xd/0x10
[   16.480394]  [<ffffffff81107a23>] vfs_read+0xb3/0x170
[   16.480399]  [<ffffffff81002d1c>] ? sysret_check+0x27/0x62
[   16.480403]  [<ffffffff81107b2c>] sys_read+0x4c/0x80
[   16.480407]  [<ffffffff81002ceb>] system_call_fastpath+0x16/0x1b
[   16.480410] ---[ end trace f16a433c45bd0baa ]---
Comment 1 Andrew Morton 2010-06-04 23:36:46 UTC
Well, it's complaining that the underlying device's driver didn't call the secret, undocumented bdi_register().

Please describe the stack which underlies that ext3 filesystem so we can go hunt down the offending code.
Comment 2 Larry Finger 2010-06-04 23:53:32 UTC
My disk controller from lspci -nnk is

00:06.0 IDE interface [0101]: nVidia Corporation MCP67 IDE Controller [10de:0560] (rev a1)
        Subsystem: Hewlett-Packard Company Device [103c:30d6]
        Kernel driver in use: AMD_IDE

Is this what you need?
Comment 3 Andrew Morton 2010-06-05 00:48:35 UTC
OK, so it's a simple ext3-on-ide setup.  No DM or loop or anything like that involved?
Comment 4 Larry Finger 2010-06-05 03:13:49 UTC
I do not think openSUSE 11.3 M7 uses a loop on boot. The dmesg output indicates that device-mapper was initialized 17 secs before the WARNING; however, I'm not using it. I will blacklist the DM modules and see if I still get the WARNING.

The demesg output just prior to the WARNING is

   11.996365] ssb: Sonics Silicon Backplane found on PCI device 0000:04:00.0
[   12.148321] hda: host max PIO5 wanted PIO255(auto-tune) selected PIO4
[   12.148661] hda: MWDMA2 mode selected
[   12.149177] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
[   12.150932] ACPI: PCI Interrupt Link [LAZA] enabled at IRQ 20
[   12.150948] HDA Intel 0000:00:07.0: PCI INT A -> Link[LAZA] -> GSI 20 (level, low) -> IRQ 20
[   12.150953] hda_intel: Disable MSI for Nvidia chipset
[   12.151034] HDA Intel 0000:00:07.0: setting latency timer to 64
[   12.290805] cfg80211: Calling CRDA to update world regulatory domain
[   12.301154] cfg80211: World regulatory domain updated:
[   12.301159]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   12.301163]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.301166]     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   12.301169]     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   12.301171]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.301174]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.878617] b43-phy0: Broadcom 4312 WLAN found (core revision 15)
[   12.924045] b43-phy0 debug: Found PHY: Analog 6, Type 5, Revision 1
[   12.924063] b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2062, Revision 2
[   13.064213] ide-cd driver 5.00
[   13.067134] ide-cd: hda: ATAPI 24X DVD-ROM DVD-R/RAM CD-R/RW drive, 2048kB Cache
[   13.067143] Uniform CD-ROM driver Revision: 3.20
[   13.080677] phy0: Selected rate control algorithm 'minstrel'
[   13.084263] Registered led device: b43-phy0::tx
[   13.084435] Registered led device: b43-phy0::rx
[   13.084603] Registered led device: b43-phy0::radio
[   13.086455] Broadcom 43xx driver loaded [ Features: PMNLS, Firmware-ID: FW13 ]
[   13.275196] Adding 2104448k swap on /dev/sda5.  Priority:-1 extents:1 across:2104448k 
[   13.885398] device-mapper: ioctl: 4.17.0-ioctl (2010-03-05) initialised: dm-devel@redhat.com
[   30.302902] ------------[ cut here ]------------
[   30.302912] WARNING: at fs/fs-writeback.c:1142 __mark_inode_dirty+0x103/0x170()

This boot was using the 2.6.35-rc1 kernel from Linville's wireless-testing tree.
Comment 5 Andrew Morton 2010-06-05 03:56:18 UTC
What does it say after the WARN trace?  This:


                                printk(KERN_ERR "bdi-%s not registered\n",
                                                                bdi->name);
Comment 6 Larry Finger 2010-06-05 04:14:19 UTC
It is "block". The messages are as follows:

[   30.303036] ---[ end trace a80f1425532f94da ]---
[   30.303039] bdi-block not registered
[   30.325691] loop: module loaded
[   30.427469] EXT3-fs: barriers not enabled
[   30.438818] kjournald starting.  Commit interval 5 seconds
[   30.439197] EXT3-fs (sda7): using internal journal
Comment 7 Andrew Morton 2010-06-05 04:23:22 UTC
Well that's not much use - that's just the default value and all it tells us is that nobody called bdi_register().  Bah.

That add_disk() fails to check the bdi_register_dev() return value doesn't help.

Blah, over to you Jens!
Comment 8 Larry Finger 2010-06-05 14:54:58 UTC
I'm willing to work on this, but don't know where to start.

Is there a simple explanation of when and where bdi_register() should be called?

I put a test of the returned value of bdi_register_dev() in add_disk(), but never got a non-zero result.

BTW, is this snippet in bdi_register() correct?

    if (bdi->dev)   /* The driver needs to use separate queues per device */
           goto exit;

This smells like an error, but returns zero.
Comment 9 Rafael J. Wysocki 2010-06-09 08:50:19 UTC
On Wednesday 09 June 2010, Larry Finger wrote:
> On 06/08/2010 05:10 PM, Rafael J. Wysocki wrote:
> > This message has been generated automatically as a part of a summary report
> > of recent regressions.
> > 
> > The following bug entry is on the current list of known regressions
> > from 2.6.34.  Please verify if it still should be listed and let the
> tracking team
> > know (either way).
> > 
> > 
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=16122
> > Subject             : 2.6.35-rc1: WARNING at fs/fs-writeback.c:1142
> __mark_inode_dirty+0x103/0x170
> > Submitter   : Larry Finger <Larry.Finger@lwfinger.net>
> > Date                : 2010-06-04 13:18 (5 days old)
> 
> Still present in 2.6.35-rc2.
Comment 10 Jens Axboe 2010-06-09 10:45:50 UTC
This puzzles me... Larry, can you try .34? I don't think this is a regression from .34.
Comment 11 Larry Finger 2010-06-09 18:31:02 UTC
I have the 2.6.34 kernel from wireless-testing, which should be the same a mainline, except for the wireless part. I never see this WARNING with that kernel, only from 2.6.35-rc1 onward.
Comment 12 Rafael J. Wysocki 2010-06-21 18:41:26 UTC
On Monday, June 21, 2010, Larry Finger wrote:
> On 06/20/2010 05:17 PM, Rafael J. Wysocki wrote:
> > This message has been generated automatically as a part of a summary report
> > of recent regressions.
> > 
> > The following bug entry is on the current list of known regressions
> > from 2.6.34.  Please verify if it still should be listed and let the
> tracking team
> > know (either way).
> > 
> > 
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=16122
> > Subject             : 2.6.35-rc1: WARNING at fs/fs-writeback.c:1142
> __mark_inode_dirty+0x103/0x170
> > Submitter   : Larry Finger <Larry.Finger@lwfinger.net>
> > Date                : 2010-06-04 13:18 (17 days old)
> 
> This is still present in rc3.
Comment 13 Rafael J. Wysocki 2010-07-08 23:03:07 UTC
Handled-By : Jens Axboe <axboe@kernel.dk>
Comment 14 Rafael J. Wysocki 2010-07-09 20:51:34 UTC
On Friday, July 09, 2010, Larry Finger wrote:
> On 07/08/2010 06:33 PM, Rafael J. Wysocki wrote:
> > This message has been generated automatically as a part of a summary report
> > of recent regressions.
> >
> > The following bug entry is on the current list of known regressions
> > from 2.6.34.  Please verify if it still should be listed and let the
> tracking team
> > know (either way).
> >
> >
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=16122
> > Subject             : 2.6.35-rc1: WARNING at fs/fs-writeback.c:1142
> __mark_inode_dirty+0x103/0x170
> > Submitter   : Larry Finger<Larry.Finger@lwfinger.net>
> > Date                : 2010-06-04 13:18 (35 days old)
> 
> This bug is still present in 2.6.35-rc4.
Comment 15 Rafael J. Wysocki 2010-07-09 21:32:53 UTC

*** This bug has been marked as a duplicate of bug 16312 ***