From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KbMMV-0006Pu-JW for mharc-grub-devel@gnu.org; Thu, 04 Sep 2008 17:27:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KbMMR-0006Mi-SG for grub-devel@gnu.org; Thu, 04 Sep 2008 17:27:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KbMMR-0006ME-9u for grub-devel@gnu.org; Thu, 04 Sep 2008 17:27:27 -0400 Received: from [199.232.76.173] (port=41860 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbMMR-0006MB-3l for grub-devel@gnu.org; Thu, 04 Sep 2008 17:27:27 -0400 Received: from fg-out-1718.google.com ([72.14.220.159]:14010) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KbMMQ-00034W-Nu for grub-devel@gnu.org; Thu, 04 Sep 2008 17:27:27 -0400 Received: by fg-out-1718.google.com with SMTP id l26so569229fgb.30 for ; Thu, 04 Sep 2008 14:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=WyG0LYP5P9VnRlZ3jl2ws4vydWjoA1sWq6acaabbf3w=; b=Oc32gXbHpuEAVKg+ZR8TzDkDY3AU4Jbi2s5VKgs1ocF4T1BZevYnctW3PoF4MYogWj rZU+Sow30U1bE1ycWfh5MhRace32cVWGSiCAToV4KG5an00yV1CIYgxqscoo5BOqUpnK 4q5q3xa0IZB1nf5ERT1FfGLkz9G8a+Ey9tgoQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=Vcl4ChAIZt7h+ZH/h34oEKUurM47MFm47CGl/g6k5w8QGVaBgBgPEP0GzY+8U1s6uB 78zkhitSjhD3edLsd+A0Q8uwQ/1qSMqjoD4DDWVBDcODR0cJUH9zj11ofJ1VFkJsqAR7 3eqcQFwFARp7KiLx3vO2EL0uIpt41bFb+PUsg= Received: by 10.86.97.20 with SMTP id u20mr8131368fgb.15.1220563644893; Thu, 04 Sep 2008 14:27:24 -0700 (PDT) Received: from ?192.168.1.15? ( [85.0.144.99]) by mx.google.com with ESMTPS id e20sm97754fga.1.2008.09.04.14.27.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 04 Sep 2008 14:27:23 -0700 (PDT) Message-ID: <48C052B8.1000007@gmail.com> Date: Thu, 04 Sep 2008 23:27:20 +0200 From: phcoder User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: The development of GRUB 2 References: <48BE5C14.3000105@gmail.com> <20080903103139.GB29762@thorin> <48BE824F.2040007@gmail.com> <20080904192617.GC9133@thorin> In-Reply-To: <20080904192617.GC9133@thorin> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [RFC]swapfso and "ioctl" function for filesystems X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2008 21:27:28 -0000 Robert Millan wrote: > On Wed, Sep 03, 2008 at 02:25:51PM +0200, phcoder wrote: >> Robert Millan wrote: >>> On Wed, Sep 03, 2008 at 11:42:44AM +0200, phcoder wrote: >>>> Hello, all. >>>> For some FS sometimes additional functions are needed. It could be some >>>> type of control (e.g. in ZFS manage zpools) or preparation for OS >>>> booting (e.g. in FAT put IO.SYS and MSDOS.SYS at the begining of the >>>> root directory). While theese functions are quite specific to FS >>>> sometimes are important to implement. >>> What would be the purpose of that? Please describe a use case. >>> >> With ZFS or ext3cow: Suppose you made a huge mistake and installed >> unbootable kernel and have no backup in another file. But ZFS/ext3cow >> has its own backup. So ZFS/ext3cow driver may provide a call something like >> static grub_err_t zfs_timeback (int timeref); >> And anounce it like: >> add_funcs={ >> {"timeback", zfs_timeback}, >> {0, 0} >> }; >> Then a module timeback.mod can suply a command like >> timeback >> which uses the function supplied by zfs and ext3cow. > > Could this be made more transparent? For example, with a variable. > Here perhaps it could be. But in other usage cases like putting the dos boot files into the right place or doing swapfso it couldn't. > Also, I'm worried that this occupies core image size for non-critical > functionality. > If filesystem module doesn't use this feature it just adds a zero pointer to grub_fs structure. It means 4 bytes (due to alignment often it probably be 0 bytes increase). And it would answer to all filesystem-specific needs. And non-essential parts of the FS module (like swapfso, dos boot files,...) may be implemented in an extra module (like ntfscomp) or there could be 2 modules for the same filesystem: basic and advanced one. Vladimir 'phcoder' Serbinenko