All of lore.kernel.org
 help / color / mirror / Atom feed
From: phcoder <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [RFC]swapfso and "ioctl" function for filesystems
Date: Thu, 04 Sep 2008 23:27:20 +0200	[thread overview]
Message-ID: <48C052B8.1000007@gmail.com> (raw)
In-Reply-To: <20080904192617.GC9133@thorin>

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 <device> <date>
>> 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



  reply	other threads:[~2008-09-04 21:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03  9:42 [RFC]swapfso and "ioctl" function for filesystems phcoder
2008-09-03 10:31 ` Robert Millan
2008-09-03 12:25   ` phcoder
2008-09-04 19:26     ` Robert Millan
2008-09-04 21:27       ` phcoder [this message]
2008-09-05  9:56         ` Robert Millan
2008-09-07  0:11           ` phcoder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48C052B8.1000007@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.