Re: [PATCH] xfs: test for shut down fs in xfs_dir_fsync()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2014-04-28 at 12:49 -0500, Mark Tinguely wrote:
> On 04/28/14 12:26, Eric Sandeen wrote:
> > On 4/28/14, 12:22 PM, Mark Tinguely wrote:
> >> On 04/28/14 12:18, Eric Sandeen wrote:
> >>> On 4/28/14, 11:47 AM, Christoph Hellwig wrote:
> >>>> On Mon, Apr 28, 2014 at 11:35:16AM -0500, Eric Sandeen wrote:
> >>>>> Similar to xfs_file_fsync(), I think xfs_dir_fsync() needs
> >>>>> to test for a shut down fs,
> >>>>
> >>>> It probably should.
> >>>>
> >>>>> lest we go down paths we'll
> >>>>> never be able to complete; Boris reported that during some
> >>>>> stress tests he had threads stuck in xlog_cil_force_lsn
> >>>>> via xfs_dir_fsync().
> >>>>
> >>>> But this could still happen if we get a shutdown coming in after that
> >>>> test.
> >>>
> >>> True... that looked a bit hairier to sort out.  :(
> >>>
> >>> -Eric
> >>>
> >>
> >>
> >> Are the sync lsn look okay? Was there an error writing the iclog buffer?
> >>
> >> xfs_do_force_shutdown() will also do a xlog_cil_force_lsn() via the
> >> xfs_log_force_umount if the log buffer write was not in error. That
> >> should be the same or later than this lsn.
> >
> > I don't have full details, unfortunately, just the sysrq backtraces.
> >
> > -Eric
> >
> >> --Mark.
> 
> anything in the log as to what caused the hang? You mention a forced 
> shutdown; what caused the forced shutdown?

Hi,

I used src/godown utility from xfstests to simulate a power failure and
cause the forced shutdown. The kernel does not report much. All I get is
this kernel message (it repeats every few seconds):

[498704.267273] XFS (dm-3): xfs_log_force: error 5 returned.

Nothing else is reported by the kernel albeit ls /mnt/point already
returns EIO.

The whole test is fairly simple to describe: It runs several threads
that ~randomly create/delete/truncate/mmap/fdatasync files in several
iterations, then (after ~2 minutes) the src/godown utility is run and
when the program gets the message from all the threads that they got
some I/O errors, it will remount the fs and tell all the threads to
continue with verification of fsynced data.

The trouble is that the program will never get the message from all the
threads because some of them are stuck in D state on fsync/fdatasync
syscall after the src/godown utility is run


> Is this the latest bits (3.15)?
> 

As Eric mentioned earlier, it is 3.10 with a lot of backports from later
kernels.

Boris

> --Mark.
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs


_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux