2005-02-03 19:03:14

by H. Peter Anvin

[permalink] [raw]
Subject: [PATCH] Updated FAT attributes patch

This updates the FAT attributes as well as (hopefully) corrects the
handling of VFAT ctime. The FAT attributes are implemented as a 32-bit
ioctl, per the previous discussions.

-hpa

Signed-Off-By: H. Peter Anvin <[email protected]>


Attachments:
fatioctl.patch (8.13 kB)

2005-02-04 12:43:10

by OGAWA Hirofumi

[permalink] [raw]
Subject: Re: [PATCH] Updated FAT attributes patch

"H. Peter Anvin" <[email protected]> writes:

> This updates the FAT attributes as well as (hopefully) corrects the
> handling of VFAT ctime. The FAT attributes are implemented as a
> 32-bit ioctl, per the previous discussions.

[...]

> + /* This MUST be done before doing anything irreversible... */
> + if ( (err = notify_change(filp->f_dentry, &ia)) )
> + goto up;
> +
> + if (sbi->options.sys_immutable) {
> + if ( attr & ATTR_SYS )
> + inode->i_flags |= S_IMMUTABLE;
> + else
> + inode->i_flags &= S_IMMUTABLE;
> + }
> +
> + MSDOS_I(inode)->i_attrs = attr & ATTR_UNUSED;

Looks good to me. However, we would need to add the mark_inode_ditry()
after seting iattr. Because another write_inode() path can clear the
dirty flag before setting ->i_attr.

I'll apply the patch and add it.

Thanks.
--
OGAWA Hirofumi <[email protected]>