Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1446224
| From | "Zheng, Lv" <lv.zheng@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH 1/3] debugfs: Add .fsync() callback proxy support |
| Date | 2016-07-19 10:20 +0200 |
| Message-ID | <rWypX-1Bu-5@gated-at.bofh.it> (permalink) |
| References | <rUF2x-3zx-3@gated-at.bofh.it> <rUF2x-3zx-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> 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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] ACPI / debugger: Add kernel flushing support Lv Zheng <lv.zheng@intel.com> - 2016-07-14 05:00 +0200
[PATCH 1/3] debugfs: Add .fsync() callback proxy support Lv Zheng <lv.zheng@intel.com> - 2016-07-14 05:00 +0200
RE: [PATCH 1/3] debugfs: Add .fsync() callback proxy support "Zheng, Lv" <lv.zheng@intel.com> - 2016-07-19 10:20 +0200
[PATCH v2 2/2] tools/power/acpi/acpidbg: Use new flushing mechanism Lv Zheng <lv.zheng@intel.com> - 2016-07-19 12:10 +0200
[PATCH v2 0/2] ACPI / debugger: Add kernel flushing support Lv Zheng <lv.zheng@intel.com> - 2016-07-19 12:10 +0200
[PATCH v2 1/2] ACPI / debugger: Add kernel flushing support Lv Zheng <lv.zheng@intel.com> - 2016-07-19 12:10 +0200
Re: [PATCH v2 1/2] ACPI / debugger: Add kernel flushing support "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-07-21 15:40 +0200
RE: [PATCH v2 1/2] ACPI / debugger: Add kernel flushing support "Zheng, Lv" <lv.zheng@intel.com> - 2016-07-22 02:40 +0200
[PATCH] tools/power/acpi/tools/acpidbg: Add multi-commands support in batch mode Lv Zheng <lv.zheng@intel.com> - 2016-07-20 10:20 +0200
Re: [PATCH] tools/power/acpi/tools/acpidbg: Add multi-commands support in batch mode "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-07-21 15:50 +0200
RE: [PATCH] tools/power/acpi/tools/acpidbg: Add multi-commands support in batch mode "Zheng, Lv" <lv.zheng@intel.com> - 2016-07-22 02:30 +0200
[PATCH v3 2/3] tools/power/acpi/acpidbg: Use new flushing mechanism Lv Zheng <lv.zheng@intel.com> - 2016-07-22 06:20 +0200
[PATCH v3 0/3] ACPI / debugger: Add kernel flushing support Lv Zheng <lv.zheng@intel.com> - 2016-07-22 06:20 +0200
[PATCH v3 1/3] ACPI / debugger: Add kernel flushing support Lv Zheng <lv.zheng@intel.com> - 2016-07-22 06:20 +0200
[PATCH v3 3/3] tools/power/acpi/acpidbg: Add multi-commands support in batch mode Lv Zheng <lv.zheng@intel.com> - 2016-07-22 06:20 +0200
csiph-web