Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Aug 2018 20:38:50 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        "freebsd-current@FreeBSD.org" <freebsd-current@FreeBSD.org>, "peter@holm.cc" <peter@holm.cc>
Subject:   Re: ffs_truncate3 panics
Message-ID:  <YTOPR0101MB182067FF6F908E0B2EBAE3D1DD250@YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <20180809111004.GK1884@kib.kiev.ua>
References:  <YTOPR0101MB18206289DDED97BE9DD38D14DD270@YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM> <20180807131445.GC1884@kib.kiev.ua> <YTOPR0101MB18207C97903D3058A15091FFDD260@YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM> <20180808221647.GH1884@kib.kiev.ua> <YTOPR0101MB18205CDE34ABCC2345C3F172DD250@YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM>, <20180809111004.GK1884@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Konstantin Belousov wrote:
[stuff snipped]
>I wrote:
>>
>> I can add printf()s anywhere you suggest, but I'm not sure how you would=
 catch
>> this case sooner? (For example, I could print out di_extsize at the begi=
nning of
>> ffs_truncate(), if that would help?)
>May be, add a loop at the beginning of ffs_truncate(), over all buffers
>on both clean and dirty queues, calculating number of buffers with
>b_lblkno < 0 and >=3D -UFS_NXADDR. Print some diagnostic if such buffer is
>detected but di_extsize is zero.
Ok, I can do that. These failures don't occur that often, so it might take =
a while
to get one.

>BTW, does NFS server use extended attributes ?  What for ?  Can you, pleas=
e,
>point out the code which does this ?
For the pNFS service, there are two system namespace extended attributes fo=
r
each file stored on the service.
pnfsd.dsfile - Stores where the data for the file is. Can be displayed by t=
he
     pnfsdsfile(8) command.

pnfsd.dsattr - Cached attributes that change when a file is written (size, =
mtime,
change) so that the MDS doesn't have to do a Getattr on the data server for=
 every client Getattr.


The code is in sys/fs/nfsserver/nfs_nfsdport.c and
sys/fs/nfsserver/nfs_nfsdserv.c. Just grep for vn_extattr to see the code.

I did notice that my code locks the vnode first and then calls vn_start_wri=
te()
 for the vn_extattr_set() calls, whereas the syscall code locks the vnode a=
fter the vn_start_write() call.

Does that matter?


Thanks, rick




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YTOPR0101MB182067FF6F908E0B2EBAE3D1DD250>