xfs
[Top] [All Lists]

Re: XFS: bad clientid on recovery on MIPS (VIPT cache)

To: Tony Lu <zlu@xxxxxxxxxx>, xfs@xxxxxxxxxxx
Subject: Re: XFS: bad clientid on recovery on MIPS (VIPT cache)
From: Ajeet Yadav <ajeet.yadav.77@xxxxxxxxx>
Date: Mon, 9 Jan 2012 12:58:22 +0530
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=mCbBG/P9nyDwffDt70EYICB1kLpDKsx3CRvWIUfzij0=; b=mv29SLISAS1kqH6gn+jr1gkDkHOmInw8QLDIkKeUBg6ncXjsLzuTe/yPsoAshddhzs 9o8qBh3u/CRKxN/uEjvvw55iDvHnUpXl8ItWR4zpn2fPKOAHA5wVMQwY47NhWAHvWm1u Qr8Y/bRI35GDdLNHfJYYmOECKwphEy9uB+lRo=
In-reply-to: <CAB4K4y7SmGKG1yVvxu5jSberYS8ayYiGHOGe81CNZHmOHi7ssg@xxxxxxxxxxxxxx>
References: <BAB94DBB0E89D8409949BC28AC95914C6875A2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <CAB4K4y7SmGKG1yVvxu5jSberYS8ayYiGHOGe81CNZHmOHi7ssg@xxxxxxxxxxxxxx>
Yes I implemented these definitions for MIPS, without them this
problem will continue to occur.

On Mon, Jan 9, 2012 at 12:52 PM, Ajeet Yadav <ajeet.yadav.77@xxxxxxxxx> wrote:
> Hi,
> You are using which kernel version ? because this is fixed in XFS in
> kernel 2.6.34
> http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commit;h=73c77e2ccc14413c232c3e0b3aa43a0c4b72ec70
>
> but for this patch to work correctly, yer you need to provide the
> architecture dependent definition of invalidate_kernel_vmap_range() /
> flush_kernel_vmap_range() and ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE,
> similar to this patch
>
> http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commit;h=252a9afff76097667429b583e8b5b170b47665a4
> http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commit;h=73be1591579084a8103a7005dd3172f3e9dd7362
>
> Note: include/linux/highmem.h provide dummy definitions if
> architecture does not define them
>
> #ifndef ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
> static inline void flush_kernel_dcache_page(struct page *page)
> {
> }
> static inline void flush_kernel_vmap_range(void *vaddr, int size)
> {
> }
> static inline void invalidate_kernel_vmap_range(void *vaddr, int size)
> {
> }
> #endi
>
>
>
>
> On Fri, Jan 6, 2012 at 3:44 PM, Tony Lu <zlu@xxxxxxxxxx> wrote:
>> Hi, Ajeet
>>
>> Sorry to bother you. By googling, I found that I am encountering the same 
>> XFS umount issue on TILE architecture. And I noticed that somebody suggested 
>> that other architectures like ARM, MIPS need to implement the following 
>> functions to fix this issue.
>>
>> flush_kernel_dcache_page()
>> flush_kernel_vmap_range()
>> void invalidate_kernel_vmap_range()
>>
>> I am not sure if these functions can really fix this issue, since I 
>> implemented these functions for TILE architecture, but did not fix it.
>>
>> So I really want to know that if you implemented these functions for MIPS to 
>> fix this issue. Or is there other method to fix this issue?
>>
>> I would be very appreciated for any feedback from you.
>>
>> Thanks
>> -Tony
>>
>>>Dear member,
>>>If I remove USB flash storage from PC/ARM/MIPS target (i.e without umount) 
>>>while >copying file to XFS partition and connect it to MIPS target I always 
>>>get
>>>XFS: xlog_recover_process_data: bad clientid
>>>XFS: log mount/recovery failed: error 5
>>>XFS: log mount failed
>>>This problem does not occur, if I connect the same USB flash to PC/ARM 
>>>target.
>>>I have tested this on 2.6.30 - 2.6.34 (It everywhere when concerend with 
>>>MIPS)
>>>
>>>I had two workaround to avoid this problem on MIPS, but I wish to know the 
>>>exact >reason of this problme on MIPS.
>>>I am really tired and giving up, so finally thought of taking your help, 
>>>your >guidence can help me.
>>>
>>>1. __flush_cache_all() at the begining of each iteration of while loop in 
>>>>function xlog_recover_process_data().
>>>
>>>     while ((dp < lp) && num_logops) {
>>>+       __flush_cache_all() ;
>>>         ASSERT(dp + sizeof(xlog_op_header_t) <= lp);
>>>         ohead = (xlog_op_header_t *)dp;
>>>         dp += sizeof(xlog_op_header_t);
>>>         if (ohead->oh_clientid != XFS_TRANSACTION &&
>>>             ohead->oh_clientid != XFS_LOG) {
>>>             xlog_warn(
>>>             "XFS: xlog_recover_process_data: bad clientid")
>>>
>>>OR
>>>
>>>2. Provide new buffer in each call to xlog_bread in function 
>>>>xlog_do_recovery_pass().
>>>
>>>          if (error)
>>>              goto bread_err2;
>>>          /* blocks in data section */
>>>          bblks = (int)BTOBB(be32_to_cpu(rhead->h_len));
>>>+        xlog_put_bp(dbp);
>>>+        dbp = xlog_get_bp(log, BTOBB(h_size));
>>>          error = xlog_bread(log, blk_no + hblks, bblks, dbp,
>>>                                     &offset);
>>>          if (error)
>>>              goto bread_err2;
>>>
>>>WIth Regards
>>>Ajeet Yadav

<Prev in Thread] Current Thread [Next in Thread>