This patch implements setattr fileop for Tux3. Tux3 now stores the
mtime properly and persistently, which I tested under UML.I'm updating the MTIME_BIT in tuxnode->present every time, before
calling inode_setattr, which marks the inode dirty. I considered
twiddling the MTIME_BIT afterwards, but I wasn't sure if that was safe
since the inode was already set dirty (and could possibly get
flushed?), so I was forced to check if the mtime/ctime was changing.Thanks to Daniel for the excellent instructions:
http://mailman.tux3.org/pipermail/tux3/2008-November/000380.html
Now we just need a git repo that works :)diff -rup linux-2.6.26.5.orig/fs/tux3/inode.c linux-2.6.26.5/fs/tux3/inode.c
--- linux-2.6.26.5.orig/fs/tux3/inode.c 2008-12-11 17:42:16.000000000 -0800
+++ linux-2.6.26.5/fs/tux3/inode.c 2008-12-11 17:50:29.000000000 -0800
@@ -218,7 +218,7 @@ static const struct file_operations tux_
static const struct inode_operations tux_file_iops = {
// .truncate = ext4_truncate,
// .permission = ext4_permission,
-// .setattr = ext4_setattr,
+ .setattr = tux3_setattr,
// .getattr = ext4_getattr
#ifdef CONFIG_EXT4DEV_FS_XATTR
// .setxattr = generic_setxattr,
@@ -324,4 +324,22 @@ struct inode *tux3_iget(struct super_blo
unlock_new_inode(inode);
return inode;
}
+
+int tux3_setattr(struct dentry *dentry, struct iattr *iattr)
+{
+ struct inode *inode = dentry->d_inode;
+ tuxnode_t *tuxnode = tux_inode(inode);
+ int error;
+
+ error = inode_change_ok(inode, iattr);
+ if (error)
+ return error;
+ if (timespec_equal(iattr->ia_valid & ATTR_MTIME ?
&iattr->ia_mtime : &inode->i_mtime,
+ iattr->ia_valid & ATTR_CTIME ?
&iattr->ia_ctime : &inode->i_ctime))
+ tuxnode->present &= ~MTIME_BIT;
+ else
+ tuxnode->present |= MTIME_BIT;
+
+...
Hi all !
I'm a modest Linux lover which has a lot of interest in file systems
and storage. Nobody is perfect, You must know I'm working at netapp,
but I hope this is going to change soon (Paris suxx, I must leave this
town)I've seen a query for easy NVRAM not limited with write cycles, I may
have a stupid trick that you could use : Use a cheap laptop (battery
backed of course, 1G ethernet give better latencies) and export an
iSCSI or AoE Lun using a ramdrive as backend. It's not as fast as
memory, but it's as fast as flash and does not die that quickly on
massive overwrites. Nice other thing is that multiple initiators can
use it, so it's not as expensive as it appears.Let me know if I can help anywhere (I can translate into french for
exemple) I'll do my best to support a project like this.Michael B.
_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3
Pulled from your hg repo. A proper git tree on kernel.org is coming
soon. Checking in to hg always works. There was a one liner bash
script floating around to symlink the user/kernel files from the
kernel tree. Hard links would be even better.I only tested that it builds, not that it works :-)
Anybody?
Regards,
Daniel
_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
Hi Michael,
A weak coder becomes a strong coder by reading code and writing code -
every day, for fun.As it happened, my initial demonstration of Ramback (see "faster than
a speeding bullet") was done on a laptop. I did not fail to notice
that the battery essentially turns a laptop into NVRAM, as long as you
have software like Ramback that can get the memory onto disk before
the battery runs out.There is always a way to help with a project, just keep your eyes open
and watch what is going on. Try cloning the mercurial reposititory
and see if that works for you, then run "make" and "make tests", and
see if the tests run ok. Check out the output from the tests and see
if you can make sense of what is going on. If not, come back here and
ask.Try reading the code and figuring out how it works. If you don't see
why it does something a particular way, ask. That means we probably
should have a comment in the code there. That kind of feedback is
helpful.Regards,
Daniel
_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3
Hi !
Ok so I'll start with cloning the mercurial repository, and alway keep
an eye on this project !I started digging a bit into the code but I must confess I feel like a
newborn just poping into reality... Bah it makes my brain work a lot
which is essentially a good thing !Good luck, anyway ! I'll to catch up things, starting with
understanding your notes.Best reagards
Michael
_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Stephen Rothwell | Re: Announce: Linux-next (Or Andrew's dream :-)) |
| Arjan van de Ven | Re: [malware-list] [RFC 0/5] [TALPA] Intro to a linux interfaceforon access scanning |
| Patrick McHardy | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Eric W. Biederman | Re: namespace support requires network modules to say "GPL" |
git: | |
