| To: | Alex Lyakas <alex@xxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: use-after-free on log replay failure |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Wed, 13 Aug 2014 10:03:12 +1000 |
| Cc: | Brian Foster <bfoster@xxxxxxxxxx>, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <DC407F6E8F8C4EE1AF7117D7D6ABF282@alyakaslap> |
| References: | <4B2A412C75324EE9880358513C069476@alyakaslap> <9D3CBECB663B4A77B7EF74B67973310A@alyakaslap> <20140804230721.GA20518@dastard> <AC10852F403846A182491ED8071135ED@alyakaslap> <20140806152042.GB39990@xxxxxxxxxxxxxxx> <CAOcd+r3bC59m7Rh-3tmjrnWnF5XoPQfE=U+=hz78NcAGu+Ou1g@xxxxxxxxxxxxxx> <20140811132057.GA1186@xxxxxxxxxxxxxxx> <20140811215207.GS20518@dastard> <20140812120341.GA46654@xxxxxxxxxxxxxxx> <DC407F6E8F8C4EE1AF7117D7D6ABF282@alyakaslap> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Tue, Aug 12, 2014 at 03:39:02PM +0300, Alex Lyakas wrote: > Then I set up the following Device Mapper target onto /dev/vde: > dmsetup create VDE --table "0 41943040 linear-custom /dev/vde 0" > I am attaching the code (and Makefile) of dm-linear-custom target. > It is exact copy of dm-linear, except that it has a module > parameter. With the parameter set to 0, this is an identity mapping > onto /dev/vde. If the parameter is set to non-0, all WRITE bios are > failed with ENOSPC. There is a workqueue to fail them in a different > context (not sure if really needed, but that's what our "real" > custom > block device does). FWIW, now I've looked at the dm module, this could easily be added to the dm-flakey driver by adding a "queue_write_error" option to it (i.e. similar to the current drop_writes and corrupt_bio_byte options). If we add the code there, then we could add a debug-only XFS sysfs variable to trigger the log recovery sleep, and then use dm-flakey to queue and error out writes. That gives us a reproducable xfstest for this condition. Brian, does that sound like a reasonable plan to you? Thanks for describing the method you've been using to reproduce the bug so clearly, Alex. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: use-after-free on log replay failure, Dave Chinner |
|---|---|
| Next by Date: | Re: Subject : Happened again, 20140811 -- Got "Internal error XFS_WANT_CORRUPTED_GOTO". Filesystem needs reformatting to correct issue., Carlos E. R. |
| Previous by Thread: | Re: use-after-free on log replay failure, Alex Lyakas |
| Next by Thread: | Re: use-after-free on log replay failure, Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |