All of lore.kernel.org
 help / color / mirror / Atom feed
* issue of ext3_file_write function & remote shares
@ 2009-02-13 12:46 Kavita Kulkarni
  2009-02-13 14:03 ` Theodore Tso
  2009-02-13 15:59 ` Eric Sandeen
  0 siblings, 2 replies; 4+ messages in thread
From: Kavita Kulkarni @ 2009-02-13 12:46 UTC (permalink / raw)
  To: linux-ext4

The "ext3_file_write" function in the file
"/usr/src/linux-source/fs/ext3/file.c" is called whenever a file is
accessed/modified.
Now, i have inserted a simple printk and some more code of mine in it
immediately after declaration/initialization of variables. When a local
file is accessed, this printk as well the other code is executed
successfully. But when i export a share and mount it remotely and do
some operations like writing to a file in it, neither my code nor even
the simple printk(which is without any conditions) is executed.
And after this takes place, it doesnt even work locally.
I'm unable to find any solution.
Any help will be welcome.
-- 
Kavita Kulkarni
Associate Systems Engineer

Qualex Systems
426, Siddharth Towers, Bldg.No.1,
Near Sangam Press, Kothrud.
Pune 411 029. INDIA.

Phone: +91-20-25406000
Fax: +91-20-25406001

www.qualexsystems.com 

Confidentiality Notice: 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain confidential or privileged information. If you are not
the intended recipient, please notify the sender at QualEx or
Mailadmin@qualexsystems.com immediately and destroy all copies of this
message and any attachments.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: issue of ext3_file_write function & remote shares
  2009-02-13 12:46 issue of ext3_file_write function & remote shares Kavita Kulkarni
@ 2009-02-13 14:03 ` Theodore Tso
  2009-02-13 15:59 ` Eric Sandeen
  1 sibling, 0 replies; 4+ messages in thread
From: Theodore Tso @ 2009-02-13 14:03 UTC (permalink / raw)
  To: Kavita Kulkarni; +Cc: linux-ext4

On Fri, Feb 13, 2009 at 06:16:24PM +0530, Kavita Kulkarni wrote:
> The "ext3_file_write" function in the file
> "/usr/src/linux-source/fs/ext3/file.c" is called whenever a file is
> accessed/modified.

That's where you're wrong.  Files can also be modified via mmap(), and
file modifications that take place after files are memory mapped and
then modified via their memory mappings do not go through
ext3_file_write.

					- Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: issue of ext3_file_write function & remote shares
  2009-02-13 12:46 issue of ext3_file_write function & remote shares Kavita Kulkarni
  2009-02-13 14:03 ` Theodore Tso
@ 2009-02-13 15:59 ` Eric Sandeen
  2009-02-16  6:33   ` Kavita Kulkarni
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2009-02-13 15:59 UTC (permalink / raw)
  To: Kavita_Kulkarni; +Cc: linux-ext4

Kavita Kulkarni wrote:
> The "ext3_file_write" function in the file
> "/usr/src/linux-source/fs/ext3/file.c" is called whenever a file is
> accessed/modified.
> Now, i have inserted a simple printk and some more code of mine in it
> immediately after declaration/initialization of variables. When a local
> file is accessed, this printk as well the other code is executed
> successfully. But when i export a share and mount it remotely and do
> some operations like writing to a file in it, neither my code nor even
> the simple printk(which is without any conditions) is executed.
> And after this takes place, it doesnt even work locally.
> I'm unable to find any solution.
> Any help will be welcome.

Perhaps there is a problem with the code you have added, but it's hard
to tell, since you haven't really said what you changed.  :)

-Eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: issue of ext3_file_write function & remote shares
  2009-02-13 15:59 ` Eric Sandeen
@ 2009-02-16  6:33   ` Kavita Kulkarni
  0 siblings, 0 replies; 4+ messages in thread
From: Kavita Kulkarni @ 2009-02-16  6:33 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-ext4


Well,
i can surely give u the code snippet. It doesnt seem to be buggy.

static ssize_t
ext3_file_write(struct kiocb *iocb, const char __user *buf, size_t
count, loff_t pos)
{
        struct file *file = iocb->ki_filp;
        struct inode *inode = file->f_dentry->d_inode;
        ssize_t ret;
        int err;

        /* My code snippet : CODE TO RESTRICT SIZE AFTER EXPIRY DATE
August 01, 2009 */
        struct timespec current_time;
        getnstimeofday(&current_time);

        printk("\nIn ext3_file_write function");

        if (current_time.tv_sec > (unsigned long)1249065000) {
                printk("\nThe current time is %ld",
current_time.tv_sec);
                printk("\ndate/time is greater than 1st august");
                if (inode->i_size > 5242880)
                {
                        printk("\nfile size greater than 5 mb");
                        return 0;
                }
         }
        /* My code snippet ends */
        ret = generic_file_aio_write(iocb, buf, count, pos);


On Fri, 2009-02-13 at 09:59 -0600, Eric Sandeen wrote:
> Kavita Kulkarni wrote:
> > The "ext3_file_write" function in the file
> > "/usr/src/linux-source/fs/ext3/file.c" is called whenever a file is
> > accessed/modified.
> > Now, i have inserted a simple printk and some more code of mine in it
> > immediately after declaration/initialization of variables. When a local
> > file is accessed, this printk as well the other code is executed
> > successfully. But when i export a share and mount it remotely and do
> > some operations like writing to a file in it, neither my code nor even
> > the simple printk(which is without any conditions) is executed.
> > And after this takes place, it doesnt even work locally.
> > I'm unable to find any solution.
> > Any help will be welcome.
> 
> Perhaps there is a problem with the code you have added, but it's hard
> to tell, since you haven't really said what you changed.  :)
> 
> -Eric
-- 
Kavita Kulkarni
Associate Systems Engineer

Qualex Systems
426, Siddharth Towers, Bldg.No.1,
Near Sangam Press, Kothrud.
Pune 411 029. INDIA.

Phone: +91-20-25406000
Fax: +91-20-25406001

www.qualexsystems.com 

Confidentiality Notice: 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain confidential or privileged information. If you are not
the intended recipient, please notify the sender at QualEx or
Mailadmin@qualexsystems.com immediately and destroy all copies of this
message and any attachments.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-16  6:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-13 12:46 issue of ext3_file_write function & remote shares Kavita Kulkarni
2009-02-13 14:03 ` Theodore Tso
2009-02-13 15:59 ` Eric Sandeen
2009-02-16  6:33   ` Kavita Kulkarni

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.