RE: [PATCH 1/3] debugfs: Add .fsync() callback proxy support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Greg

Sorry for the noise.
It's better to use ioctl to implement this functionality.
Please ignore this series.
It's already possible to implement ioctl for a debugfs file.

Thanks and best regards
-Lv

> From: Zheng, Lv
> Subject: [PATCH 1/3] debugfs: Add .fsync() callback proxy support
> 
> This patch adds .fsync() callback for debugfs files.
> ACPI AML debugger needs to implement this to flush cmds/logs.
> 
> Signed-off-by: Lv Zheng <lv.zheng@xxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
>  fs/debugfs/file.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
> index 592059f..f863a0c 100644
> --- a/fs/debugfs/file.c
> +++ b/fs/debugfs/file.c
> @@ -172,6 +172,10 @@ FULL_PROXY_FUNC(unlocked_ioctl, long, filp,
>  		PROTO(struct file *filp, unsigned int cmd, unsigned long
> arg),
>  		ARGS(filp, cmd, arg));
> 
> +FULL_PROXY_FUNC(fsync, int, filp,
> +		PROTO(struct file *filp, loff_t start, loff_t end, int datasync),
> +		ARGS(filp, start, end, datasync));
> +
>  static unsigned int full_proxy_poll(struct file *filp,
>  				struct poll_table_struct *wait)
>  {
> @@ -226,6 +230,8 @@ static void __full_proxy_fops_init(struct
> file_operations *proxy_fops,
>  		proxy_fops->poll = full_proxy_poll;
>  	if (real_fops->unlocked_ioctl)
>  		proxy_fops->unlocked_ioctl = full_proxy_unlocked_ioctl;
> +	if (real_fops->fsync)
> +		proxy_fops->fsync = full_proxy_fsync;
>  }
> 
>  static int full_proxy_open(struct inode *inode, struct file *filp)
> --
> 1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux