On Thu, Jan 24, 2013 at 4:14 AM, Marius Mårnes Mathiesen
<marius.mathie...@gmail.com> wrote:
> Another approach could be to use eg. btrfs and set up subvolumes for new
> projects in the repository root, assuming you're running with un-sharded
> paths. Let's say a user creates a project "gitorious" and the first
> repository "mainline": when generating the repository on disk in
> Gitorious we could set up a subvolume for the project, so:
>
>   /var/www/gitorious/repositories/gitorious
>
> would become a btrfs subvolume where we could enforce quotas. Achieving
> this would require a hook inside the routine where a repository is
> created in Gitorious, but it would definitely make sense (as long as
> you're ready to trust btrfs with your data). Zfs could be an alternative
> to btrfs, but the license situation is a little problematic here.

Thank you! I was imagining something vaguely along the same lines.
I'll probably avoid btrfs at this point :) but maybe I can hook up
something with LVM.


It looks like I should modify these two functions in app/models/repository.rb?

  def self.create_git_repository(path)
    full_path = full_path_from_partial_path(path)
    git_backend.create(full_path)
    self.create_hooks(full_path)
  end

  def self.clone_git_repository(target_path, source_path, options = {})
    full_path = full_path_from_partial_path(target_path)
    Grit::Git.with_timeout(nil) do
      git_backend.clone(full_path,
        full_path_from_partial_path(source_path))
    end
    self.create_hooks(full_path) unless options[:skip_hooks]
  end


What would be the optimal way to modify these in a way that I could
get it accepted upstream? I'm guessing that the
LV-creation-and-mounting code should live in a separate module to
handle all the different commands and the privilege escalation, etc.

- Ken

-- 
-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com



Reply via email to