kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: fs.rajat@gmail.com (Rajat Sharma)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Modifying the filesystem code
Date: Thu, 30 Dec 2010 12:11:50 +0530	[thread overview]
Message-ID: <AANLkTikQqZcYjBgcqhbrcuZYpEJ6Un9Ye=C0gaRLr4RT@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikvdTKfsLMH9cmynh3aATzeKNm_2ubFZz9RLWLn@mail.gmail.com>

Dinesh,

I think it would be better if you can describe our aim of the task in
plain English without any technical details. May be people can suggest
you an altogether better approach, because its getting hard to know
what exactly you want to do, is it mkdir or create or both you are
interested in? If every creation has to be prefixed, may be you don't
have to even change any of inode operations.

In short, just come up with our aim statement in plain English.

Rajat

On Thu, Dec 30, 2010 at 11:22 AM, dinesh bhaskar <pdineshb@gmail.com> wrote:
>
> Hello all,
>
> I am working on ramfs filesystem code. I would like to modify the directory
> path while creating the file.
> example when we give mkdir newfile; // this newfile should be present in
> /newlabel/newfile
> ???????????????????????????? // Assuming ramfs is mounted at /, newlabel is
> prefixed before the newfile
>
> So i am trying to modify the functions defined in the struct
> inode_operations for the directory.
>
> static const struct inode_operations ramfs_dir_inode_operations = {
> ??? .create???? = ramfs_create,
> ??? .lookup???? = simple_lookup,
> ??? .link?????? = simple_link,
> ??? .unlink???? = simple_unlink,
> ??? .symlink??? = ramfs_symlink,
> ??? .mkdir????? = ramfs_mkdir,
> ??? .rmdir????? = simple_rmdir,
> ??? .mknod????? = ramfs_mknod,?? //Modifying this function to add the prefix
> to the file
> ??? .rename???? = simple_rename,
> };
> is it possible?
>
> Let me know if I am doing something wrong.
>
>
> Thanks
> Dinesh
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>

  reply	other threads:[~2010-12-30  6:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-30  5:52 Modifying the filesystem code dinesh bhaskar
2010-12-30  6:41 ` Rajat Sharma [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-12-29 20:21 dinesh bhaskar
2010-12-29 20:36 ` Manish Katiyar
2010-12-29 21:13   ` dinesh bhaskar

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='AANLkTikQqZcYjBgcqhbrcuZYpEJ6Un9Ye=C0gaRLr4RT@mail.gmail.com' \
    --to=fs.rajat@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).