Quantcast

MPSAFE VFS -- List of upcoming actions

classic Classic list List threaded Threaded
32 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

MPSAFE VFS -- List of upcoming actions

Attilio Rao-2
As already published several times, according to the following plan:
http://wiki.freebsd.org/NONMPSAFE_DEORBIT_VFS

in 2 months the code dealing with non-MPSAFE filesystem will be
removed and filesystems not yet MPSAFE will be disconnected from the
tree. Their code will be however available in our official repository
yet for 6 months. This leaves a total time of 8 months to do actions.

Current list of unmantained filesystems is: HPFS, NWFS, PortalFS and
XFS. Coda and SMBFS have current mantainership but the status of the
work has still to be determined. NTFS, is being worked for the Summer
of Code program. Finally, ReiserFS was successfully locked during this
campaign.

It is time for community members to step up and offer time and skills
to lock a filesystem or test the effort of other developers willing to
do so.

Thanks,
Attilio


--
Peace can only be achieved by understanding - A. Einstein
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Michael Butler
On 06/29/12 16:32, Attilio Rao wrote:

> As already published several times, according to the following plan:
> http://wiki.freebsd.org/NONMPSAFE_DEORBIT_VFS
>
> in 2 months the code dealing with non-MPSAFE filesystem will be
> removed and filesystems not yet MPSAFE will be disconnected from the
> tree. Their code will be however available in our official repository
> yet for 6 months. This leaves a total time of 8 months to do actions.
>
> Current list of unmantained filesystems is: HPFS, NWFS, PortalFS and
> XFS. Coda and SMBFS have current mantainership but the status of the
> work has still to be determined. NTFS, is being worked for the Summer
> of Code program. Finally, ReiserFS was successfully locked during this
> campaign.

What is to become of fusefs and friends, i.e. write-capable NTFS and
truecrypt?

        imb


_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Kevin Oberman-3
On Fri, Jun 29, 2012 at 4:23 PM, Michael Butler
<[hidden email]> wrote:

> On 06/29/12 16:32, Attilio Rao wrote:
>> As already published several times, according to the following plan:
>> http://wiki.freebsd.org/NONMPSAFE_DEORBIT_VFS
>>
>> in 2 months the code dealing with non-MPSAFE filesystem will be
>> removed and filesystems not yet MPSAFE will be disconnected from the
>> tree. Their code will be however available in our official repository
>> yet for 6 months. This leaves a total time of 8 months to do actions.
>>
>> Current list of unmantained filesystems is: HPFS, NWFS, PortalFS and
>> XFS. Coda and SMBFS have current mantainership but the status of the
>> work has still to be determined. NTFS, is being worked for the Summer
>> of Code program. Finally, ReiserFS was successfully locked during this
>> campaign.
>
> What is to become of fusefs and friends, i.e. write-capable NTFS and
> truecrypt?
>

fusefs is not a part of the OS.It is a port. I believe gnn@ is working
on it, but I have not seen any report on its status for a while.
--
R. Kevin Oberman, Network Engineer
E-mail: [hidden email]
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Thomas Mueller
In reply to this post by Attilio Rao-2
On 06/29/12 16:32, Attilio Rao wrote:
> As already published several times, according to the following plan:
> http://wiki.freebsd.org/NONMPSAFE_DEORBIT_VFS

> in 2 months the code dealing with non-MPSAFE filesystem will be
> removed and filesystems not yet MPSAFE will be disconnected from the
> tree. Their code will be however available in our official repository
> yet for 6 months. This leaves a total time of 8 months to do actions.

> Current list of unmantained filesystems is: HPFS, NWFS, PortalFS and
> XFS. Coda and SMBFS have current mantainership but the status of the
> work has still to be determined. NTFS, is being worked for the Summer
> of Code program. Finally, ReiserFS was successfully locked during this
> campaign.

I'm familiar with HPFS but not NWFS, PortalFS and SMBFS; don't really know what Coda is.

I've been wondering about the status of XFS in (Free or other)BSD, know it's in ports and is usable in Linux.

I think you can even run Linux on XFS instead of ext(2,3 or 4)fs, or ReiserFS, or btrfs.

I remember Linux having read-only access, later also read-write, to HPFS, and I actually read HPFS partitions from Linux.

That was long ago.  Sometime during the single-digit days of April 2001, my OS/2 Warp 4 installation came apart when, following a crash where the file system was not cleanly dismounted, CHKDSK ran amok on reboot and trashed the entire hard disk, destroying a Linux installation as well.

I was never able to boot any OS/2 again after that (trap 000c or 000d if it got that far), even from installation or other diskettes; there was no such thing as bootable CD back then, at least not for OS/2 Warp 4.

Although OS/2 has continued on as eComStation (www.ecomstation.com), 32-bit i386 only, no 64-bit, eComStation has fallen far behind Linux and the BSDs.

So one could say HPFS is antiquated, very few Linux or BSD users would have use for HPFS access; my last time was in April 2001.


Tom
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Thomas Mueller
In reply to this post by Attilio Rao-2
> You can not only run Linux on XFS (which I do) but it is still likely
> the most reliable and consistently performant of the filesystems
> available in Linux because of its origin and its maturity.  XFS did
> not originate in Linux (it originated in SGI's Irix) so it should not
> surprise that Linux core developers are proponents of filesystems
> originally developed under Linux.

> Regardless, a key value of *BSD supporting non-native filesystems is
> in order to be able to access filesystems created on other OSs.

> XFS is a major filesystem so hopefully someone will volunteer to
> support it.

> Bob
> --
> Bob Friesenhahn

I remember starting threads, many months ago, both on FreeBSD and NetBSD lists about lingua franca file system for sharing data between OSes.

I can see why NTFS support is important, due to its prevalence.

But I believe very few people would have any use for HPFS access from BSD, and it would be practically impossible to find testers.

Tom
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

C. P. Ghost
In reply to this post by Attilio Rao-2
On Fri, Jun 29, 2012 at 10:32 PM, Attilio Rao <[hidden email]> wrote:

> As already published several times, according to the following plan:
> http://wiki.freebsd.org/NONMPSAFE_DEORBIT_VFS
>
> in 2 months the code dealing with non-MPSAFE filesystem will be
> removed and filesystems not yet MPSAFE will be disconnected from the
> tree. Their code will be however available in our official repository
> yet for 6 months. This leaves a total time of 8 months to do actions.
>
> Current list of unmantained filesystems is: HPFS, NWFS, PortalFS and
> XFS. Coda and SMBFS have current mantainership but the status of the
> work has still to be determined. NTFS, is being worked for the Summer
> of Code program. Finally, ReiserFS was successfully locked during this
> campaign.

Sorry if this has been discussed already, but...

it's one thing to obsolete some code, it's a different thing to
remove it entirely where there's no user-level replacement,
especially since it would also remove the ability to access
ancient media that some people may still have access to.

Couldn't filesystems that are still not MP SAFE be kept in the
tree in such a way that they at least provide read-only access
in case of emergencies?

> It is time for community members to step up and offer time and skills
> to lock a filesystem or test the effort of other developers willing to
> do so.

I don't have the skills for that, but I'd love to see some brave
soul step up to rescue PortalFS. ;-)

> Thanks,
> Attilio

Regards,
-cpghost.

--
Cordula's Web. http://www.cordula.ws/
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Attilio Rao-2
2012/7/1 C. P. Ghost <[hidden email]>:

> On Fri, Jun 29, 2012 at 10:32 PM, Attilio Rao <[hidden email]> wrote:
>> As already published several times, according to the following plan:
>> http://wiki.freebsd.org/NONMPSAFE_DEORBIT_VFS
>>
>> in 2 months the code dealing with non-MPSAFE filesystem will be
>> removed and filesystems not yet MPSAFE will be disconnected from the
>> tree. Their code will be however available in our official repository
>> yet for 6 months. This leaves a total time of 8 months to do actions.
>>
>> Current list of unmantained filesystems is: HPFS, NWFS, PortalFS and
>> XFS. Coda and SMBFS have current mantainership but the status of the
>> work has still to be determined. NTFS, is being worked for the Summer
>> of Code program. Finally, ReiserFS was successfully locked during this
>> campaign.
>
> Sorry if this has been discussed already, but...
>
> it's one thing to obsolete some code, it's a different thing to
> remove it entirely where there's no user-level replacement,
> especially since it would also remove the ability to access
> ancient media that some people may still have access to.
>
> Couldn't filesystems that are still not MP SAFE be kept in the
> tree in such a way that they at least provide read-only access
> in case of emergencies?

Unfortunately not.
First of all, they are mostly already READ-ONLY, in particular XFS and
NTFS. Second, it would be meaning leave in place the Giant-VFS bloat
that we necessarilly must get rid of.
The most interesting ones in the list, IMHO, are still SMBFS and NTFS
and possibly XFS (but this is really a personal preference).
I've received an e-mail explaining that there are arrangements by a
company to put their developers on work after 1st september on SMBFS
locking which is certainly a good new, but I still haven't heard
anything by SoC involved people about NTFS and certainly I don't see a
plan to get XFS locked.

However remind that at the worst (for filesystems like PortalFS, for
example) the code will remain in Attic even after it gets depurated
and then it can be revitalized and locked in whatever point in the
future.

Attilio


--
Peace can only be achieved by understanding - A. Einstein
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Christoph Hellwig
On Sun, Jul 01, 2012 at 03:52:05PM +0200, Attilio Rao wrote:
> anything by SoC involved people about NTFS and certainly I don't see a
> plan to get XFS locked.

Stupid question, but what amount of locking does XFS in FreeBSD still
need?  I'm one of the maintainer of XFS on Linux, and while I know
FreeBSD imported a really old version compared to the current one the
codebases on IRIX and later Linux never relied on any global Giant-style
locking.  So if there is anything to fix it would be the in the small
bits of FreeBSD-specific code.

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Russell Cattelan
On 7/2/12 1:12 AM, Christoph Hellwig wrote:

> On Sun, Jul 01, 2012 at 03:52:05PM +0200, Attilio Rao wrote:
>> anything by SoC involved people about NTFS and certainly I don't see a
>> plan to get XFS locked.
>
> Stupid question, but what amount of locking does XFS in FreeBSD still
> need?  I'm one of the maintainer of XFS on Linux, and while I know
> FreeBSD imported a really old version compared to the current one the
> codebases on IRIX and later Linux never relied on any global Giant-style
> locking.  So if there is anything to fix it would be the in the small
> bits of FreeBSD-specific code.
>
I would be curious as well. Since I'm one of the people that has done
the port of XFS to FreeBSD I'm wondering what this whole MP initiative
with regards to filesystems is about.

XFS certainly maintained any fine grain locking inherent to XFS it self.
The XFS locks were mapped to FreeBSD sx locks in the code that is in the
tree currently. The last time I made a pass at updating XFS some of
locks were remapped to mtx locks.

Is there somethings in the vfs layer in terms of locking that needs to
be pushed down to the fs?

-Russell


signature.asc (267 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Attilio Rao-2
In reply to this post by Christoph Hellwig
2012/7/2, Christoph Hellwig <[hidden email]>:

> On Sun, Jul 01, 2012 at 03:52:05PM +0200, Attilio Rao wrote:
>> anything by SoC involved people about NTFS and certainly I don't see a
>> plan to get XFS locked.
>
> Stupid question, but what amount of locking does XFS in FreeBSD still
> need?  I'm one of the maintainer of XFS on Linux, and while I know
> FreeBSD imported a really old version compared to the current one the
> codebases on IRIX and later Linux never relied on any global Giant-style
> locking.  So if there is anything to fix it would be the in the small
> bits of FreeBSD-specific code.

Basically when it cames to make a MPSAFE filesystem under FreeBSD
there are 2 things to pay attention at: filesystem specific locking
and dealing with FreeBSD's VFS locking.
The former is usually the tricky part because it varies among the
filesystems and it is where the developers might have more knowledge.
The latter can be helped by testing with a debugging kernel for low
hanging fruits, but special attention must be put in things like avoid
to put half-constructed vnodes in the mount lists, lookup races (in
particular with DOTDOT case) and others. For a reference, one can
always look to simple filesystems that are already made MPSAFE (like
MSDOS-FS likely).

In the XFS case, I think it would be desirable to have a real
maintainership. This means, basically, not only work on the locking
but really be keen to have a working XFS. At the moment, we might
still have write support as well, but it is badly broken. What I
suggest for XFS is:
- Remove the current write support entirely
- Try to bring the sole read support to new(ish) XFS version (at least
to a version that is known to not be totally broken)
- Fix up the support to work with FreeBSD VFS

Thanks,
Attilio


--
Peace can only be achieved by understanding - A. Einstein
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Attilio Rao-2
In reply to this post by Russell Cattelan
2012/7/2, Russell Cattelan <[hidden email]>:

> On 7/2/12 1:12 AM, Christoph Hellwig wrote:
>> On Sun, Jul 01, 2012 at 03:52:05PM +0200, Attilio Rao wrote:
>>> anything by SoC involved people about NTFS and certainly I don't see a
>>> plan to get XFS locked.
>>
>> Stupid question, but what amount of locking does XFS in FreeBSD still
>> need?  I'm one of the maintainer of XFS on Linux, and while I know
>> FreeBSD imported a really old version compared to the current one the
>> codebases on IRIX and later Linux never relied on any global Giant-style
>> locking.  So if there is anything to fix it would be the in the small
>> bits of FreeBSD-specific code.
>>
> I would be curious as well. Since I'm one of the people that has done
> the port of XFS to FreeBSD I'm wondering what this whole MP initiative
> with regards to filesystems is about.

So if you think that XFS doesn't need to acquire Giant why it is not
yet marked MPSAFE?
Also, did you really ever actually tested write support? (Not sure if
it was added to you).

Attilio


--
Peace can only be achieved by understanding - A. Einstein
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Alexander Kabaev-3
In reply to this post by Christoph Hellwig
On Mon, Jul 02, 2012 at 02:12:20AM -0400, Christoph Hellwig wrote:

> On Sun, Jul 01, 2012 at 03:52:05PM +0200, Attilio Rao wrote:
> > anything by SoC involved people about NTFS and certainly I don't see a
> > plan to get XFS locked.
>
> Stupid question, but what amount of locking does XFS in FreeBSD still
> need?  I'm one of the maintainer of XFS on Linux, and while I know
> FreeBSD imported a really old version compared to the current one the
> codebases on IRIX and later Linux never relied on any global Giant-style
> locking.  So if there is anything to fix it would be the in the small
> bits of FreeBSD-specific code.
>
When I stopped being interested in XFS, I left is marked as non-MPSAFE
entirely because of the lack of proper testing and because VFS locking
was still evolving, there was no officially proper way of locking the
FS and no other FS in the tree was MPSAFE. At that time the only
problematic area was around inode instantiation, but sereval other
lockingi changes have made it into the tree since then, namely ones that
deal with insmntque and also VOP_LOOKUP changes. To mark XFS MPSAFE, one
needs to simply audit the code and make sure it still makse sense for today's
VFS, which is not a huge amount of work. One step further woule be to take
most of the XFS from under the exclusive vnode locking to improve the
performance.

And there is a third option - just let current XFS port die and start with
newer version.

--
Alexander Kabaev

attachment0 (195 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Konstantin Belousov
On Mon, Jul 02, 2012 at 11:03:40AM -0400, Alexander Kabaev wrote:

> On Mon, Jul 02, 2012 at 02:12:20AM -0400, Christoph Hellwig wrote:
> > On Sun, Jul 01, 2012 at 03:52:05PM +0200, Attilio Rao wrote:
> > > anything by SoC involved people about NTFS and certainly I don't see a
> > > plan to get XFS locked.
> >
> > Stupid question, but what amount of locking does XFS in FreeBSD still
> > need?  I'm one of the maintainer of XFS on Linux, and while I know
> > FreeBSD imported a really old version compared to the current one the
> > codebases on IRIX and later Linux never relied on any global Giant-style
> > locking.  So if there is anything to fix it would be the in the small
> > bits of FreeBSD-specific code.
> >
>
> When I stopped being interested in XFS, I left is marked as non-MPSAFE
> entirely because of the lack of proper testing and because VFS locking
> was still evolving, there was no officially proper way of locking the
> FS and no other FS in the tree was MPSAFE. At that time the only
> problematic area was around inode instantiation, but sereval other
> lockingi changes have made it into the tree since then, namely ones that
> deal with insmntque and also VOP_LOOKUP changes. To mark XFS MPSAFE, one
> needs to simply audit the code and make sure it still makse sense for today's
> VFS, which is not a huge amount of work. One step further woule be to take
> most of the XFS from under the exclusive vnode locking to improve the
> performance.
If filesystem uses some global internal locks, that locks usually are
placed after the vnode locks in global lock order, because VOP methods
call into fs with vnode locked. Then, VOP_LOOKUP() usual sequence of
events, when method is called with lookup directory locked, causes LOR.
It appears because you lock global lock upon entry into VOP_LOOKUP(),
and then need to lock the returned vnode.
Dropping global lock inside VOP_LOOKUP() usually exposes races which
were the reason to introduce the global lock. Having filesystem
non-MPSAFE makes the LOR go away without the need to drop global lock.

Example of FreeBSD native filesystem which suffered from this issue
and required quite non-trivial handling is devfs. Devfs uses per-mount
global lock. See devfs_allocv() and devfs_allocv_drop_refs() for
the gory details.

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Russell Cattelan
In reply to this post by Alexander Kabaev-3
On 7/2/12 10:03 AM, Alexander Kabaev wrote:

> On Mon, Jul 02, 2012 at 02:12:20AM -0400, Christoph Hellwig wrote:
>> On Sun, Jul 01, 2012 at 03:52:05PM +0200, Attilio Rao wrote:
>>> anything by SoC involved people about NTFS and certainly I don't see a
>>> plan to get XFS locked.
>>
>> Stupid question, but what amount of locking does XFS in FreeBSD still
>> need?  I'm one of the maintainer of XFS on Linux, and while I know
>> FreeBSD imported a really old version compared to the current one the
>> codebases on IRIX and later Linux never relied on any global Giant-style
>> locking.  So if there is anything to fix it would be the in the small
>> bits of FreeBSD-specific code.
>>
>
> When I stopped being interested in XFS, I left is marked as non-MPSAFE
> entirely because of the lack of proper testing and because VFS locking
> was still evolving, there was no officially proper way of locking the
> FS and no other FS in the tree was MPSAFE. At that time the only
> problematic area was around inode instantiation, but sereval other
> lockingi changes have made it into the tree since then, namely ones that
> deal with insmntque and also VOP_LOOKUP changes. To mark XFS MPSAFE, one
> needs to simply audit the code and make sure it still makse sense for today's
> VFS, which is not a huge amount of work. One step further woule be to take
> most of the XFS from under the exclusive vnode locking to improve the
> performance.
>
> And there is a third option - just let current XFS port die and start with
> newer version.
>
I like option 3.
The current code is way way out of date and doesn't even reflect the
last round of sync up I did. Unless somebody says "hey I'm using XFS" we
could just let the current code go and reintroduce a current port
if it ever receives the needed attention.

Unfortunately I think there were would have be be some sponsorship of
the effort since getting xfs fully supported would require some
significant developer hours.

If anybody is interesting in the current state of things here is my git
tree that I cleaned up and put online during BSDCan.
http://git.digitalelves.com/?p=FreeBSD_xfs.git;a=summary

xfs-FreeBSD_7 has the last somewhat functional code.
This was based on a code drop from linux XFS at the time.

Log recovery was just starting to come to life (very simple recovery
would work)
Write was working to the point there you could do a single thread to the
fs and have the data cmp back with the original file.

Read also still works but is unstable.

xfs-FreeBSD_9 is quick code drop I did a month or so ago.
I does not compile as many of the linux files moved around so
not all the compat stuff lines up and some new compat code needs
to written.

-Russell



signature.asc (267 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Alexander Kabaev-3
In reply to this post by Konstantin Belousov
On Mon, 2 Jul 2012 23:12:06 +0300
Konstantin Belousov <[hidden email]> wrote:

> On Mon, Jul 02, 2012 at 11:03:40AM -0400, Alexander Kabaev wrote:
> > On Mon, Jul 02, 2012 at 02:12:20AM -0400, Christoph Hellwig wrote:
> > > On Sun, Jul 01, 2012 at 03:52:05PM +0200, Attilio Rao wrote:
> > > > anything by SoC involved people about NTFS and certainly I
> > > > don't see a plan to get XFS locked.
> > >
> > > Stupid question, but what amount of locking does XFS in FreeBSD
> > > still need?  I'm one of the maintainer of XFS on Linux, and while
> > > I know FreeBSD imported a really old version compared to the
> > > current one the codebases on IRIX and later Linux never relied on
> > > any global Giant-style locking.  So if there is anything to fix
> > > it would be the in the small bits of FreeBSD-specific code.
> > >
> >
> > When I stopped being interested in XFS, I left is marked as
> > non-MPSAFE entirely because of the lack of proper testing and
> > because VFS locking was still evolving, there was no officially
> > proper way of locking the FS and no other FS in the tree was
> > MPSAFE. At that time the only problematic area was around inode
> > instantiation, but sereval other lockingi changes have made it into
> > the tree since then, namely ones that deal with insmntque and also
> > VOP_LOOKUP changes. To mark XFS MPSAFE, one needs to simply audit
> > the code and make sure it still makse sense for today's VFS, which
> > is not a huge amount of work. One step further woule be to take
> > most of the XFS from under the exclusive vnode locking to improve
> > the performance.
>
> If filesystem uses some global internal locks, that locks usually are
> placed after the vnode locks in global lock order, because VOP methods
> call into fs with vnode locked. Then, VOP_LOOKUP() usual sequence of
> events, when method is called with lookup directory locked, causes
> LOR. It appears because you lock global lock upon entry into
> VOP_LOOKUP(), and then need to lock the returned vnode.
> Dropping global lock inside VOP_LOOKUP() usually exposes races which
> were the reason to introduce the global lock. Having filesystem
> non-MPSAFE makes the LOR go away without the need to drop global lock.
>
> Example of FreeBSD native filesystem which suffered from this issue
> and required quite non-trivial handling is devfs. Devfs uses per-mount
> global lock. See devfs_allocv() and devfs_allocv_drop_refs() for
> the gory details.
All very informative, though misplaced in case of XFS. XFS does not use
global lock internally, it is quite well locked inside and exclusive
_VNODE_ lock we take by default in all methods is usually unnecessary
as all it does it prevents other locks in XFS proper from having any
useful function.

--
Alexander Kabaev

signature.asc (195 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Attilio Rao-2
In reply to this post by Attilio Rao-2
2012/6/29 Attilio Rao <[hidden email]>:
> As already published several times, according to the following plan:
> http://wiki.freebsd.org/NONMPSAFE_DEORBIT_VFS
>

I still haven't heard from Vivien or Edward, anyway as NTFS is
basically only used RO these days (also the mount_ntfs code just
permits RO mounting) I stripped all the uncomplete/bogus write support
with the following patch:
http://www.freebsd.org/~attilio/ntfs_remove_write.patch

This is an attempt to make the code smaller and possibly just focus on
the locking that really matter (as read-only filesystem).
On some points of the patch I'm a bit less sure as we could easily
take into account also write for things like vaccess() arguments, and
make easier to re-add correct write support at some point in the
future, but still force RO, even if the approach used in the patch is
more correct IMHO.
As an added bonus this patch cleans some dirty code in the mount
operation and fixes a bug as vfs_mountedfrom() is called before real
mounting is completed and can still fail.

The patch has been kindly tested by pho@.  If none has objections I
will commit it friday evening.

Thanks,
Attilio


--
Peace can only be achieved by understanding - A. Einstein
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Attilio Rao-2
2012/7/4 Attilio Rao <[hidden email]>:

> 2012/6/29 Attilio Rao <[hidden email]>:
>> As already published several times, according to the following plan:
>> http://wiki.freebsd.org/NONMPSAFE_DEORBIT_VFS
>>
>
> I still haven't heard from Vivien or Edward, anyway as NTFS is
> basically only used RO these days (also the mount_ntfs code just
> permits RO mounting) I stripped all the uncomplete/bogus write support
> with the following patch:
> http://www.freebsd.org/~attilio/ntfs_remove_write.patch
>
> This is an attempt to make the code smaller and possibly just focus on
> the locking that really matter (as read-only filesystem).
> On some points of the patch I'm a bit less sure as we could easily
> take into account also write for things like vaccess() arguments, and
> make easier to re-add correct write support at some point in the
> future, but still force RO, even if the approach used in the patch is
> more correct IMHO.
> As an added bonus this patch cleans some dirty code in the mount
> operation and fixes a bug as vfs_mountedfrom() is called before real
> mounting is completed and can still fail.

A quick update on this.
It looks like NTFS won't be completed for this GSoC thus I seriously
need to find an alternative to not loose the NTFS support entirely.

I tried to look into the NTFS implementation right now and it is
really a poor support. As Peter has also verified, it can deadlock in
no-time, it compeltely violates VFS rules, etc. IMHO it deserves a
complete rewrite if we would still support in-kernel NTFS. I also
tried to look at the NetBSD implementation. Their code is someway
similar to our, but they used very complicated (and very dirty) code
to do the locking. Even if I don't know well enough NetBSD VFS, I have
the impression not all the races are correctly handled. Definitively,
not something I would like to port.

Considering all that the only viable option would be meaning an
userland filesystem implementation. My preferred choice would be to
import PUFFS and librefuse on top of it but honestly it requires a lot
of time to be completed, time which I don't currently have as in 2
months Giant must be gone by the VFS.

I then decided to switch to gnn's rewamp of FUSE patches. You can find
his initial e-mail here:
http://lists.freebsd.org/pipermail/freebsd-fs/2012-March/013876.html

I've precisely got the second version of George's patch and created
this dolphin branch:
svn://svn.freebsd.org/base/projects/fuse

I'm fixing low hanging fruit for the moment (see r238411 for example)
and I still have to make a throughful review.
However my idea is to commit the support once:
- ntfs-3g is well stress-tested and proves to be bug-free
- there is no major/big technical issue pending after the reviews

I'm now looking for people sticking with the branch and trying to
stress-test ntfs-3g as much as they can. For example I know that
Gustau (cc'ed) already had issues. It would be good if he tries to
reproduce them and make a full report.

Please try to stick with the code contained with this branch for the
tests unless diversly advised.

As final note, George as agreed to maintain FUSE in the long-term and
of course I'll give him an hand as time permits.

Thanks,
Attilio


--
Peace can only be achieved by understanding - A. Einstein
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Gustau Pérez i Querol-2

    Sorry fo the delay.

    About the ntfs support, I'd go with fuse and leave the most relevant
filesystems in kernel space. In fact filesystems not particulary
specific and not tied our kernel would go to userspace; thinks like
smbfs, nwfs, ntfs, ext2 o ext4 for example should be in userspace (the
list is incomplete and I don't really know if all of them are yet
implemenent in userspace) in my opinion. That would make them easier to
maintain (changes in the kernel would only affect fuse, once fixed all
the userspace filesystem would work again).

    As a bonus, we would get many working fs based on fuse. In the
server side gluster is a desirable thing; in the desktop things like
gvfs (in the linux world gvfs is used not only by gnome but also by kde
or xfce) or truecrypt

>
> I'm fixing low hanging fruit for the moment (see r238411 for example)
> and I still have to make a throughful review.
> However my idea is to commit the support once:
> - ntfs-3g is well stress-tested and proves to be bug-free
> - there is no major/big technical issue pending after the reviews
>
> I'm now looking for people sticking with the branch and trying to
> stress-test ntfs-3g as much as they can. For example I know that
> Gustau (cc'ed) already had issues. It would be good if he tries to
> reproduce them and make a full report.

    I've seen ntfs-3g+fuse crashing a few times and IIRC most of the
time the problem happened while unmounting the filesystem.

    I don't have the core dump files at hand, so I'll try to fix gnn
patches to compile with my recent current (it doesn't compile, time ago
I fixed fuse but I guess those patches wouldn't be enough right now) and
try to panic the machine. When I do I'll do full reports of the panics.

> As final note, George as agreed to maintain FUSE in the long-term and
> of course I'll give him an hand as time permits.

    Any moment you need help needed coding, testing, etc let me know.

> Thanks,
> Attilio
>
>


--
---------------------------------------------------------------------------
Prou top-posting : http://ca.wikipedia.org/wiki/Top-posting
Stop top-posting : http://en.wikipedia.org/wiki/Posting_style       

O O O Gustau Pérez i Querol
O O O Departament d'Enginyeria Telemàtica
O O O Universitat Politècnica de Catalunya
       Edifici C3 - Despatx S101-B
  UPC  Campus Nord UPC
       C/ Jordi Girona, 1-3
       08034 - Barcelona

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

Attilio Rao-2
2012/7/18, Gustau Pérez i Querol <[hidden email]>:

>
>     Sorry fo the delay.
>
>     About the ntfs support, I'd go with fuse and leave the most relevant
> filesystems in kernel space. In fact filesystems not particulary
> specific and not tied our kernel would go to userspace; thinks like
> smbfs, nwfs, ntfs, ext2 o ext4 for example should be in userspace (the
> list is incomplete and I don't really know if all of them are yet
> implemenent in userspace) in my opinion. That would make them easier to
> maintain (changes in the kernel would only affect fuse, once fixed all
> the userspace filesystem would work again).
>
>     As a bonus, we would get many working fs based on fuse. In the
> server side gluster is a desirable thing; in the desktop things like
> gvfs (in the linux world gvfs is used not only by gnome but also by kde
> or xfce) or truecrypt

I'm really concerned also about ntfs and smbfs at the moment. It seems
that there is also a FUSE smbfs port, but I never used it and I'm not
sure about its state at all.

>>
>> I'm fixing low hanging fruit for the moment (see r238411 for example)
>> and I still have to make a throughful review.
>> However my idea is to commit the support once:
>> - ntfs-3g is well stress-tested and proves to be bug-free
>> - there is no major/big technical issue pending after the reviews
>>
>> I'm now looking for people sticking with the branch and trying to
>> stress-test ntfs-3g as much as they can. For example I know that
>> Gustau (cc'ed) already had issues. It would be good if he tries to
>> reproduce them and make a full report.
>
>     I've seen ntfs-3g+fuse crashing a few times and IIRC most of the
> time the problem happened while unmounting the filesystem.

The FUSE module you had testing still has several bugs.
You can try this patch:
http://people.freebsd.org/~attilio/fuse_AW_DONE_ISDOTDOT_collision.patch

on top of the FUSE branch I'm working on:
svn://svn.freebsd.org/base/projects/fuse/

however it still doesn't address the cloning races (I'm rewriting it
in order to take advantage of devfs_*_devpriv() interface right now).

Thanks,
Attilio


--
Peace can only be achieved by understanding - A. Einstein
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MPSAFE VFS -- List of upcoming actions

dougb
In reply to this post by Gustau Pérez i Querol-2
On 07/17/2012 22:54, Gustau Pérez i Querol wrote:
> In fact filesystems not particulary specific and not tied our kernel
> would go to userspace; thinks like smbfs, nwfs, ntfs, ext2 o ext4 for
> example should be in userspace

A big -1 here.

The more native FS support we have the better off we are in terms of
both people migrating from other OS', and people who need to maintain
compatibility with other OS'. Personally I use both msdosfs and ext2fs
extensively for the latter purpose, and would not want to see either
removed.

Doug

--

    Change is hard.



_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
12
Loading...