[PATCH 1/2] MTD: add fsync capability

Corentin Chary corentin.chary at gmail.com
Fri Feb 6 03:06:28 EST 2009


I just copied the mtd_close()/mtd_open() function thinking that is was
mtd's codestyle.
So, maybe it's time to clean the while file. I can try to do that next
week if I find the time.

Have the receveid "fsync() for UBI" patch ? it's seems the mail is
waiting for approval on the mailing list.


On 2/6/09, Artem Bityutskiy <dedekind at infradead.org> wrote:
> On Thu, 2009-02-05 at 17:00 -0500, Mike Frysinger wrote:
>> On Thu, Feb 5, 2009 at 16:25, Corentin Chary wrote:
>> > +static int mtd_fsync(struct file *file, struct dentry *dentry, int
>> > datasync)
>> > +{
>> > +       struct mtd_file_info *mfi = file->private_data;
>> > +       struct mtd_info *mtd = mfi->mtd;
>> > +
>> > +       DEBUG(MTD_DEBUG_LEVEL0, "MTD_fsync\n");
>> > +
>> > +       /* Only sync if opened RW */
>> > +       if ((file->f_mode & FMODE_WRITE) && mtd->sync)
>> > +               mtd->sync(mtd);
>> > +
>> > +       return 0;
>> > +} /* mtd_fsync */
>>
>> adding a comment to mark the end of a function isnt common ... i'd
>> drop that.  otherwise, the patch looks pretty straightforward to me,
>> but i'm not a big VFS guru ;).
>> -mike
>
> The patch looks fine for me, except of the weird end comment, and
> the ancient ugly "DEBUG(MTD_DEBUG_LEVEL0, "MTD_fsync\n");" ...
>
> --
> Best regards,
> Artem Bityutskiy (Битюцкий Артём)
>
>


-- 
Corentin Chary
http://xf.iksaif.net



More information about the linux-mtd mailing list