OpenBSD Journal

3rd Party Patch for inode-based directory quotas.

Contributed by sean on from the interesting idea but not quite all there dept.

Michal Kosinski writes:

Few days ago I've found interesting project page for OpenBSD. It allows to set quota per directory, which seems to be good solution for webhosting solutions. I've used this patch on my test box and it was running quite fine. The only thing that doesn't work is tracking quota while moving files.

I haven't noticed any performance fall or any other disadvantages using it. Hope it'll be rock-solid solution soon.

Actually that's the only working way to set directory quota I've found on the net.


Note: I gave this a quick run on 3.6 stable and it seems to work alright but note that you need to reformat a slice (ie. newfs) before enabling the option in fstab. I have not tried this on current so your milage may vary.

(Comments are closed)


Comments
  1. By Anonymous Coward (213.80.9.187) on

    Scary code. It makes one central assumption that is not true and cannot be true in a unix filesystem - that an inode has one parent. This code cannot possibly work with renames and hard links. Also, it looks a lot like it violates the vnode locking order (considering that we go from inode to parent which is something the vfs code should never do, mostly because normally the vfs code doesn't know about any parents).

    Comments
    1. By X (81.56.211.110) on

      please change the 755 by default on the home/user..we need privacy.

  2. By tedu (64.173.147.27) on

    1. more documentation. what's the problem, more about how the patch works, how somebody would use it, ...
    2. could probably be in 3 pieces. a) parent pointers and cleanup. b) kernel patch. c) userland patch.
    3. use rwlocks, don't roll own with flags and tsleep. if you're changing code that uses flags, fix it first. :)
    4. don't use //. if it's not needed, delete it. if it may be needed later, #ifdef INOQ_DEBUG.

  3. By Pete (64.255.167.140) on

    Reminds me of qtree's on netapps. This could be a really useful utility for people running NFS servers in a hosting environment.

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]