[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:52:30 +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=XUnJ1Cz2Dhd8B35qeYNcHjun5DGOZt0pu7KZmElVmNk=; b=lU+qCsMpkZUdps6up4voAN3kExOJR6+eCQQVk6x3yNalm9wrJysFxYC5L4ZY4eP/wj 2OkUtauWW8cCMEjwpdLxkyff2wQpQvcMwz1BP87P72VLg1Ws3qO6jXk64DXEffpULmNV odd/eKRFnFsM3J3OOZXRP4risZqVR+oSvtjkE=
In-reply-to: <BAB94DBB0E89D8409949BC28AC95914C6875A2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <AQHMGZPV5VwDWzpPGkmBdYCEZM2g7JYAfYLwgAAGIHA=> <BAB94DBB0E89D8409949BC28AC95914C6875A2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
You are using which kernel version ? because this is fixed in XFS in
kernel 2.6.34

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


Note: include/linux/highmem.h provide dummy definitions if
architecture does not define them

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)

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 
>>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")
>>2. Provide new buffer in each call to xlog_bread in function 
>>          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>