* Re: [Qemu-devel] [PATCH] block: init bs->io_base correctly to avoid locking
From: Peter Lieven @ 2013-01-10 12:26 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kwolf, Markus Armbruster, qemu-devel@nongnu.org
In-Reply-To: <50EEB0FB.80909@redhat.com>
Am 10.01.2013 um 13:15 schrieb Paolo Bonzini <pbonzini@redhat.com>:
> Il 10/01/2013 13:12, Peter Lieven ha scritto:
>>>>
>>>> But perhaps we do not need to start a slice at all when iolimits are
>>>> set. That is, do
>>>>
>>>> bs->slice_start = bs->slice_end = bs->slice_time = 0;
>>>>
>>>> or perhaps even nothing at all since bdrv_io_limits_disable should have
>>>> written those exact values.
>> Or it was set when the BlockDriverState was initialized.
>>
>> I am not familiar enough with the io limits code to decide if not starting a slice
>> is also correct.
>
> I haven't tested it, but if it works, I think it is better.
i will test and report.
Peter
>
> Think of it this way: it doesn't matter whether the first I/O operation
> comes immediately after limits are set, or 10 seconds later. In the
> latter case, bdrv_exceed_io_limits will _already_ start a new slice. It
> is better to be consistent and always delay the start of the slice.
>
> Paolo
^ permalink raw reply
* Re: xennet: skb rides the rocket: 20 slots
From: Ian Campbell @ 2013-01-10 12:26 UTC (permalink / raw)
To: ANNIE LI; +Cc: Sander Eikelenboom, xen-devel, Konrad Rzeszutek Wilk
In-Reply-To: <50EEA46E.7000604@oracle.com>
On Thu, 2013-01-10 at 11:22 +0000, ANNIE LI wrote:
> I am thinking to do re-fragment in netfront for these skbs like following,
>
> Create a new skb, copy linear data and frag data from original skb into
> this one, and make every frags data size is PAGE_SIZE except for the
> last fragment. It is possible that the last fragment length is less than
> PAGE_SIZE, then free the original skb. The skb packet is large, and
> there will be lots of copys.
You don't need (or I suspect want) to copy, you can directly add pages
from the source skb's frags to the destination skb's frags, with
appropriate refcount frobbing. You can also share a page between two (or
more) skbs in the case where the boundary between two skbs happens to be
in the middle of a page.
But more importantly than all that you need to do more than just
refragment, you actually need to resegment i.e. you need to duplicate
the headers (Ethernet, IP, TCP) at the front of each new skb and adjust
the (psuedo-)checksums as appropriate (which will depend on whether the
SKB is GSO, or just has checksum offload or nothing).
So you need to go from
<Ether><IP><TCP><...data... ...data...>
to
<Ether><IP><TCP><...data...> <Ether><IP><TCP><...data...>
Where the headers are adjusted to cope with this. Some of data might be
in frags but equally some might be in skb->data.
I'm guessing that Linux already has code which can do this for you,
since it has a software fallback for GSO.
Ian.
>
> struct skbuff *xennet_refrag_skb(skb)
> {
> create newskb
> copying data and doing fragmentation
> return newskb
> }
>
> .......
>
> if (unlikely(slots> MAX_SKB_FRAGS + 1)) {
> net_alert_ratelimited(
> "xennet: skb rides the rocket: %d slots\n", slots);
> skb = xennet_refrag_skb(skb);
> }
> .....
>
> Thanks
> Annie
> >
> >> "netchannel vs MAX_SKB_FRAGS". Maybe these two mechanism are all
> >> necessary?
> > Lets see first if this is indeed the problem. Perhaps a simple debug
> > patch that just does:
> >
> > s/MAX_SKB_FRAGS/DEBUG_MAX_FRAGS/
> > #define DEBUG_MAX_FRAGS 21
> >
> > in both netback and netfront to set the maximum number of frags we can
> > handle to 21? If that works with Sander test - then yes, it looks like
> > we really need to get this 'feature-max-skb-frags' done.
> >
^ permalink raw reply
* Fix phy_init for Marvell network eth driver
From: Kosta Zertsekel @ 2013-01-10 12:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130110122441.GQ3392@lunn.ch>
> This comment is supposed to be in the header of the patch.
> Since this comment is about a bug for the D-Link DNS323_REV_C1, the fix to DSA should be in a separate patch, again with a comment about the patch, why its needed, what if fixes etc.
> I suggest you take a look at Documentation/SubmittingPatches
Oh, I know. I am really sorry for the mess with 'git sendemail' (forgot --compose flag or something).
I'll resend the patch "locally" with patch header email and then repost the both patches again on netdev and linux-arm-kernel.
Sorry again.
Thanks,
--- KostaZ
^ permalink raw reply
* RE: Fix phy_init for Marvell network eth driver
From: Kosta Zertsekel @ 2013-01-10 12:27 UTC (permalink / raw)
To: Andrew Lunn
Cc: Lior Amsalem, netdev@vger.kernel.org, Eran Ben-Avi,
linux-arm-kernel@lists.infradead.org, zertsekel@gmail.com
In-Reply-To: <20130110122441.GQ3392@lunn.ch>
> This comment is supposed to be in the header of the patch.
> Since this comment is about a bug for the D-Link DNS323_REV_C1, the fix to DSA should be in a separate patch, again with a comment about the patch, why its needed, what if fixes etc.
> I suggest you take a look at Documentation/SubmittingPatches
Oh, I know. I am really sorry for the mess with 'git sendemail' (forgot --compose flag or something).
I'll resend the patch "locally" with patch header email and then repost the both patches again on netdev and linux-arm-kernel.
Sorry again.
Thanks,
--- KostaZ
^ permalink raw reply
* Re: [PATCH] Provide support for multiple frame buffers in Xen
From: Tim Deegan @ 2013-01-10 12:29 UTC (permalink / raw)
To: Robert Phillips; +Cc: Jan Beulich, xen-devel
In-Reply-To: <1357138062-9032-1-git-send-email-robert.phillips@citrix.com>
Hi,
I was really hoping to commit this today, but unfortunately, I've
spotted two things:
1. There are a few uses of *_to_virt() to get persistent mappings
of arbitrary addresses (PTEs, and pages of linked-list entries).
That's presumably going to interact badly with Jan's work to support
very large machines, which will reintroduce [un]map_domain_page()
for 64-bit x86.
I wouldn't hold this patch back just for that, specially since the
code it replaces already uses maddr_to_virt(), but since it needs a
respin for the other thing I'd like Jan's opinion.
2. This code still allocates user-controlled amounts of stack memory:
> + {
> + int size = (nr + BITS_PER_LONG - 1) / BITS_PER_LONG;
> + unsigned long dirty_bitmap[size];
> +
> + memset(dirty_bitmap, 0x00, size * BYTES_PER_LONG);
> +
> + flush_tlb |= shadow_scan_dirty_flags(d, range, (uint8_t*)dirty_bitmap);
> +
> + rc = -EFAULT;
> + if ( copy_to_guest(guest_dirty_bitmap,
> + (uint8_t*)dirty_bitmap,
> + size * BYTES_PER_LONG) == 0 )
> + rc = 0;
> + }
Cheers,
Tim.
^ permalink raw reply
* Re: [Qemu-devel] unbounded qemu NetQue's ?
From: Stefan Hajnoczi @ 2013-01-10 12:29 UTC (permalink / raw)
To: Luigi Rizzo; +Cc: qemu-devel
In-Reply-To: <CA+hQ2+iQhvGqtSHMBqLeZMhgJmk9WAHrOpteRHNEaE4uEkaSZQ@mail.gmail.com>
On Mon, Jan 07, 2013 at 03:27:30PM +0100, Luigi Rizzo wrote:
> On Mon, Jan 7, 2013 at 2:49 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>
> > On Sun, Jan 06, 2013 at 08:23:56PM +0100, Luigi Rizzo wrote:
> > diff -urp qemu-1.3.0-orig/net/queue.c qemu-1.3.0/net/queue.c
> > > --- qemu-1.3.0-orig/net/queue.c 2012-12-03 20:37:05.000000000+0100
> > > +++ qemu-1.3.0/net/queue.c 2013-01-06 19:38:12.000000000 +0100
> > > @@ -92,6 +92,9 @@ static void qemu_net_queue_append(NetQue
> >
> > Please also do it for qemu_net_queue_append_iov().
> >
> >
> the qemu code has many duplicate functions of the form foo() and foo_iov() .
> Not only here, but even in the backents (e.g. see net/tap.c)
> I think it would be good to settle on a single version of the function
> and remove or convert the non-iov instances.
Yes. Patches welcome.
Stefan
^ permalink raw reply
* Re: missing RX_FLAG_DECRIPTED in ieee80211_rx_status after first reassociation in 802.11R
From: Johannes Berg @ 2013-01-10 12:30 UTC (permalink / raw)
To: Cédric Debarge - ACKSYS; +Cc: linux-wireless
In-Reply-To: <018801cdef1b$dca15b10$95e41130$@acksys.fr>
Hi Cédric,
> I attached the trace file since it is quite long (about 1400 lines).
> Here are some pointers :
> Original AP = 90:A4:DE:AA:42:94, channel : 132, ssid : acksyscdtest
> Second AP = 90:A4:DE:AA:41:ED, channel : 132, ssid : acksyscdtest
>
> When wpa_supplicant is launched, it associates directly with
> 90:A4:DE:AA:42:94.
> The roaming order is given by the wpa_cli roam command (roam
> 90:A4:DE:AA:41:ED). You can find it at line 1042 of the traces.
> I used the -T option of wpa_supplicant.
>
> In order to get cfg80211 traces I had to switch to compat wireless
> version 2012-12-06 (previous was 2012-09-07). Nevertheless, the
> behavior seems to remain the same (same exit in
> ieee80211_key_enable_hw_accel at the first roam).
Thanks for the trace! That allowed me to understand the bug very easily,
I didn't realize you had used FT.
It looks like this bug was introduced by my
commit 66e67e418908442389d3a9e6509985f01cbaf9b0
Author: Johannes Berg <johannes.berg@intel.com>
Date: Fri Jan 20 13:55:27 2012 +0100
mac80211: redesign auth/assoc
This changed the way mac80211 allocates stations when it connects to an
AP, to allocate it before associating. wpa_supplicant can deal with key
setting being rejected before association and will set the key again
after association, which is the code path that was used before this code
change in mac80211, but now mac80211 would accept the key even before
that.
I think the patch below might work to restore the old behaviour:
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 7d290bc..48a03b0 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -164,7 +164,7 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
sta = sta_info_get(sdata, mac_addr);
else
sta = sta_info_get_bss(sdata, mac_addr);
- if (!sta) {
+ if (!sta || !test_sta_flag(sta, WLAN_STA_ASSOC)) {
ieee80211_key_free(sdata->local, key);
err = -ENOENT;
goto out_unlock;
That would probably be a reasonable patch for stable. I think the other
way we could handle this is accept the key, and only upload it to the
hardware after the station has been marked associated.
johannes
^ permalink raw reply related
* [PATCH v2 BlueZ] unit: Avoid D-Bus calling _exit() during SDP tests
From: Anderson Lizardo @ 2013-01-10 12:30 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Anderson Lizardo
In-Reply-To: <1357779808-25513-1-git-send-email-anderson.lizardo@openbossa.org>
While running tests, the D-Bus library was set to call _exit() when the
client leaves the bus. This caused the second test to be interrupted
without providing a PASS/FAIL result. This was confirmed by running
test-sdp with DBUS_VERBOSE=1.
This commit disables this behavior, which does not exist on BlueZ
because g_dbus_set_disconnect_function() implicitly does this.
---
unit/test-gdbus-client.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/unit/test-gdbus-client.c b/unit/test-gdbus-client.c
index aaf8342..34c714e 100644
--- a/unit/test-gdbus-client.c
+++ b/unit/test-gdbus-client.c
@@ -78,6 +78,9 @@ static struct context *create_context(void)
return NULL;
}
+ /* Avoid D-Bus library calling _exit() before next test finishes. */
+ dbus_connection_set_exit_on_disconnect(context->dbus_conn, FALSE);
+
return context;
}
--
1.7.9.5
^ permalink raw reply related
* Re: [PATCH v2 BlueZ] unit: Avoid D-Bus calling _exit() during SDP tests
From: Johan Hedberg @ 2013-01-10 12:31 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: linux-bluetooth
In-Reply-To: <1357821030-11412-1-git-send-email-anderson.lizardo@openbossa.org>
Hi Lizardo,
On Thu, Jan 10, 2013, Anderson Lizardo wrote:
> While running tests, the D-Bus library was set to call _exit() when the
> client leaves the bus. This caused the second test to be interrupted
> without providing a PASS/FAIL result. This was confirmed by running
> test-sdp with DBUS_VERBOSE=1.
>
> This commit disables this behavior, which does not exist on BlueZ
> because g_dbus_set_disconnect_function() implicitly does this.
> ---
> unit/test-gdbus-client.c | 3 +++
> 1 file changed, 3 insertions(+)
Applied. Thanks.
Johan
^ permalink raw reply
* Re: [Qemu-devel] [PATCH 00/15] qdev: make reset semantics more clear and consistent, reset qbuses under virtio devices
From: Peter Maydell @ 2013-01-10 12:31 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Anthony Liguori, qemu-devel, Andreas Färber, mst
In-Reply-To: <50EEB045.6080908@redhat.com>
On 10 January 2013 12:12, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 10/01/2013 12:59, Peter Maydell ha scritto:
>>>>>> >>> > It's possible. I'll move the SCSI bus away from qdev reset.
>>>>>> >>> > Anthony/Michael, can you help doing the same with PCIDevice? And
>>>>>> >>> > perhaps Peter and Andreas with sysbus?
>>>> >> What does it even mean to reset a sysbus? Do we do it anywhere?
>>>> >> (it looks like vl.c does, just as a shortcut so memory mapped devices
>>>> >> get their reset hooks called?)
>> So how should it work instead? I kind of feel like all qdev devices should
>> get their reset hook called on machine reset, regardless of bus [since it's
>> modelling power cycling the whole system], but would that break
>> something?
>
> It's just an implementation detail. Right now we have a common
> callback. The idea is to give each bus its own callback. In the case
> of sysbus it would just call a method; for PCI it would reset some
> configuration and then call a method; for SCSI there is no need to call
> a method at all; and so on.
But machine reset shouldn't call bus specific PCI or SCSI reset
methods -- we've just effectively yanked the power to the VM
so everything should just reset as if it was freshly constructed.
A bus-specific reset method would be for buses where the bus
itself has some sort of guest-triggerable reset (by prodding the
chipset, for instance).
> In addition, navigating the qdev tree should be explicit in the methods.
> It will not happen anymore via the "magic" qdev_reset_all.
*Something* has to say "call reset for every qdev object in the
system", surely?
-- PMM
^ permalink raw reply
* [PATCH] ARM: kernel: DT cpu map validity check helper function
From: Lorenzo Pieralisi @ 2013-01-10 12:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130110121514.GD29952@linaro.org>
On Thu, Jan 10, 2013 at 12:15:14PM +0000, Dave Martin wrote:
> On Thu, Jan 10, 2013 at 11:48:27AM +0000, Lorenzo Pieralisi wrote:
> > Since the introduction of /cpu nodes bindings for ARM and the
> > corresponding parse function arm_dt_init_cpu_maps(), the cpu_logical_map
> > and the number of possible CPUs are set according to the DT /cpu
> > nodes entries. Currently most of the existing ARM SMP platforms detect the
> > number of cores through HW probing in their .smp_init_cpus functions and set
> > the possible CPU mask accordingly.
> > This method should be upgraded so that the CPU counting mechanism will be
> > based on DT, keeping legacy HW probing mechanism as a fall back solution.
> >
> > In order to implement this fall back solution mechanism, the ARM DT code
> > should provide a helper function to platforms to check if the cpu map
> > has been properly initialized through DT. If the check fails the
> > platform will resort to legacy HW based cores counting mechanism.
> >
> > This patch implements a trivial flag and a helper function that platform
> > can call to check whether DT based cpu map initialization and cores count
> > were completed successfully.
> >
> > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > ---
> > arch/arm/include/asm/prom.h | 10 ++++++++++
> > arch/arm/kernel/devtree.c | 5 +++++
> > 2 files changed, 15 insertions(+)
> >
> > diff --git a/arch/arm/include/asm/prom.h b/arch/arm/include/asm/prom.h
> > index a219227..487614a 100644
> > --- a/arch/arm/include/asm/prom.h
> > +++ b/arch/arm/include/asm/prom.h
> > @@ -18,6 +18,15 @@
> > extern struct machine_desc *setup_machine_fdt(unsigned int dt_phys);
> > extern void arm_dt_memblock_reserve(void);
> > extern void __init arm_dt_init_cpu_maps(void);
> > +/*
> > + * Return true if cpu map initialization has been
> > + * carried out correctly from DT
> > + */
> > +static inline bool __init arm_dt_cpu_map_valid(void)
> > +{
> > + extern bool valid_dt_cpu_map;
> > + return valid_dt_cpu_map;
> > +}
> >
> > #else /* CONFIG_OF */
> >
> > @@ -28,6 +37,7 @@ static inline struct machine_desc *setup_machine_fdt(unsigned int dt_phys)
> >
> > static inline void arm_dt_memblock_reserve(void) { }
> > static inline void arm_dt_init_cpu_maps(void) { }
> > +static inline bool __init arm_dt_cpu_map_valid(void) { return false; }
> >
> > #endif /* CONFIG_OF */
> > #endif /* ASMARM_PROM_H */
> > diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
> > index 70f1bde..c82af3b 100644
> > --- a/arch/arm/kernel/devtree.c
> > +++ b/arch/arm/kernel/devtree.c
> > @@ -62,6 +62,10 @@ void __init arm_dt_memblock_reserve(void)
> > memblock_reserve(base, size);
> > }
> > }
> > +/*
> > + * Export DT cpu map validity flag to platforms
> > + */
> > +bool valid_dt_cpu_map __initdata;
>
> Is there any possibility of this being useful after boot?
> Hopefully not, but maybe there's something I haven't considered.
I do not think so, at least for the use cases I have envisaged at the moment,
but it is certainly something I should consider.
Thanks,
Lorenzo
^ permalink raw reply
* Re: [PATCH] ARM: kernel: DT cpu map validity check helper function
From: Lorenzo Pieralisi @ 2013-01-10 12:33 UTC (permalink / raw)
To: Dave Martin
Cc: Mark Rutland, Nicolas Pitre, Kukjin Kim, Russell King, Pawel Moll,
Stephen Warren, Tony Lindgren,
devicetree-discuss@lists.ozlabs.org, Magnus Damm,
rob.herring@calxeda.com, Grant Likely, David Brown,
linux-arm-kernel@lists.infradead.org, Hiroshi Doyu
In-Reply-To: <20130110121514.GD29952@linaro.org>
On Thu, Jan 10, 2013 at 12:15:14PM +0000, Dave Martin wrote:
> On Thu, Jan 10, 2013 at 11:48:27AM +0000, Lorenzo Pieralisi wrote:
> > Since the introduction of /cpu nodes bindings for ARM and the
> > corresponding parse function arm_dt_init_cpu_maps(), the cpu_logical_map
> > and the number of possible CPUs are set according to the DT /cpu
> > nodes entries. Currently most of the existing ARM SMP platforms detect the
> > number of cores through HW probing in their .smp_init_cpus functions and set
> > the possible CPU mask accordingly.
> > This method should be upgraded so that the CPU counting mechanism will be
> > based on DT, keeping legacy HW probing mechanism as a fall back solution.
> >
> > In order to implement this fall back solution mechanism, the ARM DT code
> > should provide a helper function to platforms to check if the cpu map
> > has been properly initialized through DT. If the check fails the
> > platform will resort to legacy HW based cores counting mechanism.
> >
> > This patch implements a trivial flag and a helper function that platform
> > can call to check whether DT based cpu map initialization and cores count
> > were completed successfully.
> >
> > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > ---
> > arch/arm/include/asm/prom.h | 10 ++++++++++
> > arch/arm/kernel/devtree.c | 5 +++++
> > 2 files changed, 15 insertions(+)
> >
> > diff --git a/arch/arm/include/asm/prom.h b/arch/arm/include/asm/prom.h
> > index a219227..487614a 100644
> > --- a/arch/arm/include/asm/prom.h
> > +++ b/arch/arm/include/asm/prom.h
> > @@ -18,6 +18,15 @@
> > extern struct machine_desc *setup_machine_fdt(unsigned int dt_phys);
> > extern void arm_dt_memblock_reserve(void);
> > extern void __init arm_dt_init_cpu_maps(void);
> > +/*
> > + * Return true if cpu map initialization has been
> > + * carried out correctly from DT
> > + */
> > +static inline bool __init arm_dt_cpu_map_valid(void)
> > +{
> > + extern bool valid_dt_cpu_map;
> > + return valid_dt_cpu_map;
> > +}
> >
> > #else /* CONFIG_OF */
> >
> > @@ -28,6 +37,7 @@ static inline struct machine_desc *setup_machine_fdt(unsigned int dt_phys)
> >
> > static inline void arm_dt_memblock_reserve(void) { }
> > static inline void arm_dt_init_cpu_maps(void) { }
> > +static inline bool __init arm_dt_cpu_map_valid(void) { return false; }
> >
> > #endif /* CONFIG_OF */
> > #endif /* ASMARM_PROM_H */
> > diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
> > index 70f1bde..c82af3b 100644
> > --- a/arch/arm/kernel/devtree.c
> > +++ b/arch/arm/kernel/devtree.c
> > @@ -62,6 +62,10 @@ void __init arm_dt_memblock_reserve(void)
> > memblock_reserve(base, size);
> > }
> > }
> > +/*
> > + * Export DT cpu map validity flag to platforms
> > + */
> > +bool valid_dt_cpu_map __initdata;
>
> Is there any possibility of this being useful after boot?
> Hopefully not, but maybe there's something I haven't considered.
I do not think so, at least for the use cases I have envisaged at the moment,
but it is certainly something I should consider.
Thanks,
Lorenzo
^ permalink raw reply
* Re: [PATCH v9 2/3] x86, apicv: add virtual x2apic support
From: Gleb Natapov @ 2013-01-10 12:34 UTC (permalink / raw)
To: Zhang, Yang Z
Cc: kvm@vger.kernel.org, Shan, Haitao, mtosatti@redhat.com,
Tian, Kevin
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E2F64DA@SHSMSX101.ccr.corp.intel.com>
On Thu, Jan 10, 2013 at 12:22:51PM +0000, Zhang, Yang Z wrote:
> Gleb Natapov wrote on 2013-01-10:
> > On Thu, Jan 10, 2013 at 11:54:21AM +0000, Zhang, Yang Z wrote:
> >>>> The right logic should be:
> >>>> When register virtualization enabled, read all apic msr(except apic id reg and
> >>> tmcct which have the hook) not cause vmexit and only write TPR not cause
> >>> vmexit.
> >>>> When vid enabled, write to TPR, EOI and SELF IPI not cause vmexit.
> >>>> It's better to put the patch of envirtualize x2apic mode as first patch.
> >>>>
> >>> There is no point whatsoever to enable virtualize x2apic without
> >>> allowing at least one non intercepted access to x2apic MSR range and
> >>> this is what your patch is doing when run on cpu without vid capability.
> >> No, at least read/write TPR will not cause vmexit if virtualize x2apic mode is
> > enabled.
> > For that you need to disable 808H MSR intercept, which your patch does not do.
> I want to do this in next patch.
>
Then don't. There is no point in the patch that enables virtualize
x2apic and does not allow at least one non-intercepted MSR access.
> >> I am not sure whether I understand your comments right in previous
> >> discussion, here is my thinking: 1. enable virtualize x2apic mode if
> >> guest is really using x2apic and clear TPR in msr read and write
> >> bitmap. This will benefit reading TPR. 2. If APIC registers
> >> virtualization is enabled, clear all bit in rang
> > 0x800-0x8ff(except apic id reg and tmcct).
> > Clear all read bits in the range.
> >
> >> 3. If vid is enabled, clear EOI and SELF IPI in msr write map.
> >>
> > Looks OK.
> >
> >> One concern you mentioned is that vid enabled and virtualize x2apic is disabled
> > but guest still use x2apic. In this case, we still use MSR bitmap to intercept x2apic.
> > This means the vEOI update will never happen. But we still can benefit from
> > interrupt window.
> >>
> > What interrupt windows? Without virtualized x2apic TPR/EOI
> > virtualization will not happen and we rely on that in the code.
> Yes, but we can eliminate vmexit of interrupt window. Interrupt still can delivery to guest without vmexit when guest enables interrupt if vid is enabled. See SDM vol 3, 29.2.2.
>
What does it matter that you eliminated vmexit of interrupt window if
you broke everything else? The vid patch assumes that apic emulation
either entirely happens in a software when vid is disabled or in a CPU
if vid is enabled. Mixed mode will not work (apic->isr_count = 1 trick
will break things for instance). And it is not worth it to complicate
the code to make it work.
--
Gleb.
^ permalink raw reply
* Re: [PATCH 05/11] spi/pxa2xx: make clock rate configurable from platform data
From: Mika Westerberg @ 2013-01-10 12:38 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Mark Brown, linux-kernel, grant.likely, linus.walleij,
eric.y.miao, linux, haojian.zhuang, chao.bi, H. Peter Anvin
In-Reply-To: <20130110095803.GJ13897@intel.com>
On Thu, Jan 10, 2013 at 11:58:03AM +0200, Mika Westerberg wrote:
> On Wed, Jan 09, 2013 at 11:07:26PM +0100, Rafael J. Wysocki wrote:
> > We hardcode different kinds of information into the kernel anyway, but it
> > would be good to be able to use some criteria to decide whether or not we need
> > that information on the given system.
> >
> > In this particular case, we'll only need the fixed clock rate for the SPI
> > which is not present on other x86 systems to date.
> >
> > Mika, do you have any idea what checks to apply to figure out whether or not
> > the SPI clock will be necessary?
>
> I've tried to figure out them but so far I have no ideas :-/
>
> If we put that behind some config option, it 1) confuses users and 2)
> distro makers will select it anyway, so I don't see this as an option.
>
> > Perhaps we can add a check into acpi_create_platform_device()? Something like
> > "if the device ID is present in table X, then run function Y for the device"
> > where Y will configure the clock if the SPI is matched?
>
> That would work but then we must also make sure that if the device was
> enumerated from PCI, it gets this clock via some other means.
>
> The LPSS devices can be configured to either appear on PCI or ACPI and of
> course ACPI has the advantage because then we can enumerate the slave
> devices behind the bus as well. However, it might be possible that we need
> to support PCI enumeration at some point.
>
> Furthermore, the SPI controller has an existing PCI glue driver
> (spi-pxa2xx-pci.c) that needs to pass this clock as well. This is for Intel
> CE4100 platform and we must make sure that it still works after our change.
Here's one more proposal based on the discussion so far.
1. Enable CONFIG_COMMON_CLK on x86.
2. Create Lynxpoint specific clock driver and place it under
drivers/clk/x86/clk-lpt.c. This is a platform driver for
platform device named 'clk-lpt'.
3. We make the acpi_create_platform_device() match on, lets say
"INT33C" (a partial match), and in such case it assumes that we are
running on Lynxpoint. It will then create platform device for 'clk-lpt'.
4. Now the clk-lpt driver creates the clocks.
5. The SPI driver gets the clock it wants.
In case of CE4100 we make drivers/clk/x86/clk-ce4100.c that exposes
ce4100_clk_init(). This gets called from arch/x86/platform/ce4100/ce4100.c.
I'm not sure about the LPSS PCI case. Maybe we can forget that for now
(except the CE4100 case which obviously must work)? Or add similar quirk to
the PCI side that creates the platform device for clocks.
^ permalink raw reply
* Re: [v2 6/9] ARM: dt: tegra114: Add new SoC base, Tegra 114 SoC
From: Hiroshi Doyu @ 2013-01-10 12:35 UTC (permalink / raw)
To: swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
In-Reply-To: <50ECA277.5050907-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> wrote @ Tue, 8 Jan 2013 23:49:27 +0100:
> On 01/08/2013 05:47 AM, Hiroshi Doyu wrote:
> > Initial support for Tegra 114 SoC. This is expected to be included in
> > the board DTS files, Tegra 114 SoC based evaluation board family.
>
> > diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
>
> > + gic: interrupt-controller {
> > + compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
> > + reg = <0x50041000 0x1000
> > + 0x50042000 0x1000>;
> > + interrupt-controller;
> > + #interrupt-cells = <3>;
> > + };
>
> Last time around, Marc Zyngier asked:
>
> > If this is indeed an A15 GIC, how about adding the GICH and GICV
> > regions, as well as the VGIC maintenance interrupt?
I missed to update. I'll update v3 as bellow.
gic: interrupt-controller {
compatible = "arm,cortex-a15-gic";
#interrupt-cells = <3>;
interrupt-controller;
reg = <0x50041000 0x1000>,
<0x50042000 0x1000>,
<0x50044000 0x2000>,
<0x50046000 0x2000>;
interrupts = <1 9 0xf04>;
};
^ permalink raw reply
* [v2 6/9] ARM: dt: tegra114: Add new SoC base, Tegra 114 SoC
From: Hiroshi Doyu @ 2013-01-10 12:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50ECA277.5050907@wwwdotorg.org>
Stephen Warren <swarren@wwwdotorg.org> wrote @ Tue, 8 Jan 2013 23:49:27 +0100:
> On 01/08/2013 05:47 AM, Hiroshi Doyu wrote:
> > Initial support for Tegra 114 SoC. This is expected to be included in
> > the board DTS files, Tegra 114 SoC based evaluation board family.
>
> > diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
>
> > + gic: interrupt-controller {
> > + compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
> > + reg = <0x50041000 0x1000
> > + 0x50042000 0x1000>;
> > + interrupt-controller;
> > + #interrupt-cells = <3>;
> > + };
>
> Last time around, Marc Zyngier asked:
>
> > If this is indeed an A15 GIC, how about adding the GICH and GICV
> > regions, as well as the VGIC maintenance interrupt?
I missed to update. I'll update v3 as bellow.
gic: interrupt-controller {
compatible = "arm,cortex-a15-gic";
#interrupt-cells = <3>;
interrupt-controller;
reg = <0x50041000 0x1000>,
<0x50042000 0x1000>,
<0x50044000 0x2000>,
<0x50046000 0x2000>;
interrupts = <1 9 0xf04>;
};
^ permalink raw reply
* Re: [Qemu-devel] [PATCH 05/11] chardev: add hmp hotplug commands
From: Luiz Capitulino @ 2013-01-10 12:35 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Gerd Hoffmann, qemu-devel
In-Reply-To: <50EE98FF.3090607@redhat.com>
On Thu, 10 Jan 2013 11:33:35 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 07/01/2013 14:55, Gerd Hoffmann ha scritto:
> > +void hmp_chardev_add(Monitor *mon, const QDict *qdict)
> > +{
> > + const char *args = qdict_get_str(qdict, "args");
> > + Error *err = NULL;
> > + QemuOpts *opts;
> > +
> > + opts = qemu_opts_parse(qemu_find_opts("chardev"), args, 1);
> > + if (opts == NULL) {
> > + error_setg(&err, "Parsing chardev args failed\n");
> > + } else {
> > + qemu_chr_new_from_opts(opts, NULL, &err);
>
> This ought to use qmp_chardev_add and a generic opts->ChardevBackend
> conversion.
>
> But IMHO, this kind of intermediate conversion is okay, with the
> "correct" thing deferred; being able to play with hotplug from HMP is
> worth the small wart. It's really Luiz's decision, so I'm not giving
> the reviewed-by (yet).
Fine with me. But please, add a comment if you respin.
^ permalink raw reply
* [PATCH] git-commit-tree(1): correct description of defaults
From: Peter Eisentraut @ 2013-01-10 12:29 UTC (permalink / raw)
To: git, gitster
The old phrasing indicated that the EMAIL environment variable takes
precedence over the user.email configuration setting, but it is the
other way around.
Signed-off-by: Peter Eisentraut <peter@eisentraut.org>
---
Documentation/git-commit-tree.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt
index 6d5a04c..a221169 100644
--- a/Documentation/git-commit-tree.txt
+++ b/Documentation/git-commit-tree.txt
@@ -72,13 +72,13 @@ if set:
GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL
GIT_COMMITTER_DATE
- EMAIL
(nb "<", ">" and "\n"s are stripped)
In case (some of) these environment variables are not set, the information
is taken from the configuration items user.name and user.email, or, if not
-present, system user name and the hostname used for outgoing mail (taken
+present, the environment variable EMAIL, or, if that is not set,
+system user name and the hostname used for outgoing mail (taken
from `/etc/mailname` and falling back to the fully qualified hostname when
that file does not exist).
--
1.7.10.4
^ permalink raw reply related
* Re: [Qemu-devel] [PATCH 08/11] chardev: add serial chardev support to chardev-add (qmp)
From: Gerd Hoffmann @ 2013-01-10 12:37 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
In-Reply-To: <50EEA06B.9070200@redhat.com>
Hi,
>> Can we just use one name, either tty or serial?
Ah, after reading the parport patch comment I think I understand what
you suggest:
(1) Standardize on 'serial' + 'parallel' on the new qmp interface.
(2) Support these names on -chardev too.
(3) Alias the old names to the new ones for -chardev for backward
compatibility.
correct?
cheers,
Gerd
^ permalink raw reply
* Re: GCC question
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-01-10 12:36 UTC (permalink / raw)
To: Franck Jullien; +Cc: barebox
In-Reply-To: <CAJfOKBzoXNvQu38qXXu9w9fyBuWqC_kAmHUqw2Z5B=8d9ymejg@mail.gmail.com>
On 10:02 Wed 09 Jan , Franck Jullien wrote:
> Hi,
>
> I have a question not directly related to Barebox but I think I can
> find some answer here: )
>
> I would like to use initcalls in a Linux user's land program on a x86 target.
>
> I'm doing something like this:
>
> #ifndef _INIT_H
> #define _INIT_H
>
> typedef int (*initcall_t)(void);
>
> extern initcall_t __start_target, __stop_target;
>
> #define target_initcall(fn) static initcall_t _##fn \
> __attribute__((used)) \
> __attribute__ ((section("target"))) = fn
>
> #endif
>
> then:
>
> initcall_t *initcall;
>
> for (initcall = &__start_target;
> initcall < &__stop_target; initcall++) {
> printf("initcall-> %p\n", *initcall);
> ret = (*initcall)();
> if (ret)
> printf("initcall %p failed: %d\n", *initcall, ret);
> }
>
> Everything looks fine except the linker removes the function
> "initcalled" because it is not
> referenced anywhere and this is normal.
>
> I have not modified the linker script (I'm using the default one). I'm
> using auto generated
> __start_target and __stop_target symbols generated by the linker.
>
> My question is: why does it work in barebox ? For example, in
> nios2/generic.c we have only
> static function and initcalls. So why the linker does optimize out
> those functions ? Is it
> because we have initcall corresponding sections in the linker script ?
on userspace you can use directly the contructor
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply
* Re: [Qemu-devel] [PATCH] e1000: document ICS read behaviour
From: Michael S. Tsirkin @ 2013-01-10 12:08 UTC (permalink / raw)
To: qemu-devel, Bill Paul
Cc: Paolo Bonzini, Anthony Liguori, Jason Wang, Stefan Hajnoczi
In-Reply-To: <20130110120339.GA21794@redhat.com>
On Thu, Jan 10, 2013 at 02:03:39PM +0200, Michael S. Tsirkin wrote:
> Add code comment to clarify the reason we set ICS with ICR:
> the reason was previously undocumented and git
> log (commit b1332393cdd7d023de8f1f8aa136ee7866a18968)
> confused rather than clarified the comments.
> Digging in the mailing list archives gives the real reason
> https://lists.gnu.org/archive/html/qemu-devel/2009-06/msg00401.html
>
> Add code comment with an explanation supplied by Bill Paul.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This is v2 of the patch.
> ---
> hw/e1000.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/hw/e1000.c b/hw/e1000.c
> index 92fb00a..d10119c 100644
> --- a/hw/e1000.c
> +++ b/hw/e1000.c
> @@ -230,7 +230,17 @@ set_interrupt_cause(E1000State *s, int index, uint32_t val)
> val |= E1000_ICR_INT_ASSERTED;
> }
> s->mac_reg[ICR] = val;
> +
> + /*
> + * Make sure ICR and ICS registers have the same value.
> + * The spec says that the ICS register is write-only. However in practice,
> + * on real hardware ICS is readable, and for reads it has the same value as
> + * ICR (except that ICS does not have the clear on read behaviour of ICR).
> + *
> + * The VxWorks PRO/1000 driver uses this behaviour.
> + */
> s->mac_reg[ICS] = val;
> +
> qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0);
> }
>
> --
> MST
^ permalink raw reply
* Re: [PATCH V5 18/30] fs: add read_iter and write_iter to several file systems
From: Boaz Harrosh @ 2013-01-10 12:40 UTC (permalink / raw)
To: Dave Kleikamp
Cc: jfs-discussion, Jan Kara, Bob Copeland, linux-karma-devel,
linux-mtd, Mikulas Patocka, linux-nilfs, Richard Weinberger,
Christoph Hellwig, v9fs-developer, linux-ext4, Jeff Dike,
Evgeniy Dushistov, user-mode-linux-devel, Prasad Joshi,
reiserfs-devel, osd-dev, OGAWA Hirofumi, Joern Engel,
Tigran A. Aivazian, linux-kernel, logfs, Benny Halevy,
linux-fsdevel, Andreas Dilger
In-Reply-To: <1357761525-22718-19-git-send-email-dave.kleikamp@oracle.com>
On 01/09/2013 09:58 PM, Dave Kleikamp wrote:
> These are the simple ones.
>
> File systems that use generic_file_aio_read() and generic_file_aio_write()
> can trivially support generic_file_read_iter() and generic_file_write_iter().
>
> This patch adds those file_operations for 9p, adfs, affs, bfs, exofs, ext2,
> ext3, fat, f2fs, hfs, hfsplus, hostfs, hpfs, jfs, jffs2, logfs, minix, nilfs2,
> omfs, ramfs, reiserfs, romfs, sysv, and ufs.
>
> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> Cc: Zach Brown <zab@zabbo.net>
> Cc: v9fs-developer@lists.sourceforge.net
> Cc: Tigran A. Aivazian <tigran@aivazian.fsnet.co.uk>
> Cc: Jan Kara <jack@suse.cz>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Andreas Dilger <adilger.kernel@dilger.ca>
> Cc: linux-ext4@vger.kernel.org
> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Thanks looks good.
ACK-by: Boaz Harrosh <bharrosh@panasas.com>
> Cc: Boaz Harrosh <bharrosh@panasas.com>
> Cc: Benny Halevy <bhalevy@tonian.com>
> Cc: osd-dev@open-osd.org
> Cc: Jeff Dike <jdike@addtoit.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: user-mode-linux-devel@lists.sourceforge.net
> Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
> Cc: jfs-discussion@lists.sourceforge.net
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: linux-mtd@lists.infradead.org
> Cc: Joern Engel <joern@logfs.org>
> Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
> Cc: logfs@logfs.org
> Cc: linux-nilfs@vger.kernel.org
> Cc: Bob Copeland <me@bobcopeland.com>
> Cc: linux-karma-devel@lists.sourceforge.net
> Cc: reiserfs-devel@vger.kernel.org
> Cc: Christoph Hellwig <hch@infradead.org>
> Cc: Evgeniy Dushistov <dushistov@mail.ru>
> ---
> fs/9p/vfs_addr.c | 4 ++--
> fs/9p/vfs_file.c | 8 ++++----
> fs/adfs/file.c | 4 ++--
> fs/affs/file.c | 4 ++--
> fs/bfs/file.c | 4 ++--
> fs/exofs/file.c | 4 ++--
> fs/ext2/file.c | 4 ++--
> fs/ext3/file.c | 4 ++--
> fs/f2fs/file.c | 4 ++--
> fs/fat/file.c | 4 ++--
> fs/hfs/inode.c | 4 ++--
> fs/hfsplus/inode.c | 4 ++--
> fs/hostfs/hostfs_kern.c | 4 ++--
> fs/hpfs/file.c | 4 ++--
> fs/jffs2/file.c | 8 ++++----
> fs/jfs/file.c | 4 ++--
> fs/logfs/file.c | 4 ++--
> fs/minix/file.c | 4 ++--
> fs/nilfs2/file.c | 4 ++--
> fs/omfs/file.c | 4 ++--
> fs/ramfs/file-mmu.c | 4 ++--
> fs/ramfs/file-nommu.c | 4 ++--
> fs/reiserfs/file.c | 4 ++--
> fs/romfs/mmap-nommu.c | 2 +-
> fs/sysv/file.c | 4 ++--
> fs/ufs/file.c | 4 ++--
> 26 files changed, 55 insertions(+), 55 deletions(-)
>
> diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
> index e70f239..01c0673 100644
> --- a/fs/9p/vfs_addr.c
> +++ b/fs/9p/vfs_addr.c
> @@ -249,8 +249,8 @@ static int v9fs_launder_page(struct page *page)
> * the VFS gets them, so this method should never be called.
> *
> * Direct IO is not 'yet' supported in the cached mode. Hence when
> - * this routine is called through generic_file_aio_read(), the read/write fails
> - * with an error.
> + * this routine is called through generic_file_read_iter(), the read/write
> + * fails with an error.
> *
> */
> static ssize_t
> diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
> index c2483e9..2e9441d 100644
> --- a/fs/9p/vfs_file.c
> +++ b/fs/9p/vfs_file.c
> @@ -746,8 +746,8 @@ const struct file_operations v9fs_cached_file_operations = {
> .llseek = generic_file_llseek,
> .read = v9fs_cached_file_read,
> .write = v9fs_cached_file_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .open = v9fs_file_open,
> .release = v9fs_dir_release,
> .lock = v9fs_file_lock,
> @@ -759,8 +759,8 @@ const struct file_operations v9fs_cached_file_operations_dotl = {
> .llseek = generic_file_llseek,
> .read = v9fs_cached_file_read,
> .write = v9fs_cached_file_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .open = v9fs_file_open,
> .release = v9fs_dir_release,
> .lock = v9fs_file_lock_dotl,
> diff --git a/fs/adfs/file.c b/fs/adfs/file.c
> index a36da53..da1e021 100644
> --- a/fs/adfs/file.c
> +++ b/fs/adfs/file.c
> @@ -24,11 +24,11 @@
> const struct file_operations adfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .splice_read = generic_file_splice_read,
> };
>
> diff --git a/fs/affs/file.c b/fs/affs/file.c
> index af3261b..d09a2db 100644
> --- a/fs/affs/file.c
> +++ b/fs/affs/file.c
> @@ -28,9 +28,9 @@ static int affs_file_release(struct inode *inode, struct file *filp);
> const struct file_operations affs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .open = affs_file_open,
> .release = affs_file_release,
> diff --git a/fs/bfs/file.c b/fs/bfs/file.c
> index ad3ea14..3d14806 100644
> --- a/fs/bfs/file.c
> +++ b/fs/bfs/file.c
> @@ -24,9 +24,9 @@
> const struct file_operations bfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> };
> diff --git a/fs/exofs/file.c b/fs/exofs/file.c
> index 491c6c0..20564f8a 100644
> --- a/fs/exofs/file.c
> +++ b/fs/exofs/file.c
> @@ -69,8 +69,8 @@ const struct file_operations exofs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .open = generic_file_open,
> .release = exofs_release_file,
> diff --git a/fs/ext2/file.c b/fs/ext2/file.c
> index a5b3a5d..6af043b 100644
> --- a/fs/ext2/file.c
> +++ b/fs/ext2/file.c
> @@ -64,8 +64,8 @@ const struct file_operations ext2_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl = ext2_ioctl,
> #ifdef CONFIG_COMPAT
> .compat_ioctl = ext2_compat_ioctl,
> diff --git a/fs/ext3/file.c b/fs/ext3/file.c
> index 25cb413..a796771 100644
> --- a/fs/ext3/file.c
> +++ b/fs/ext3/file.c
> @@ -52,8 +52,8 @@ const struct file_operations ext3_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl = ext3_ioctl,
> #ifdef CONFIG_COMPAT
> .compat_ioctl = ext3_compat_ioctl,
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index f9e085d..86d9c4b 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -624,8 +624,8 @@ const struct file_operations f2fs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .open = generic_file_open,
> .mmap = f2fs_file_mmap,
> .fsync = f2fs_sync_file,
> diff --git a/fs/fat/file.c b/fs/fat/file.c
> index a62e0ec..92d587b 100644
> --- a/fs/fat/file.c
> +++ b/fs/fat/file.c
> @@ -164,8 +164,8 @@ const struct file_operations fat_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .release = fat_file_release,
> .unlocked_ioctl = fat_generic_ioctl,
> diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
> index 2a87ba4..0db0679 100644
> --- a/fs/hfs/inode.c
> +++ b/fs/hfs/inode.c
> @@ -666,9 +666,9 @@ static int hfs_file_fsync(struct file *filp, loff_t start, loff_t end,
> static const struct file_operations hfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> .fsync = hfs_file_fsync,
> diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
> index c87b26c..9b8cdb6 100644
> --- a/fs/hfsplus/inode.c
> +++ b/fs/hfsplus/inode.c
> @@ -373,9 +373,9 @@ static const struct inode_operations hfsplus_file_inode_operations = {
> static const struct file_operations hfsplus_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> .fsync = hfsplus_file_fsync,
> diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
> index 457addc..4593a9a 100644
> --- a/fs/hostfs/hostfs_kern.c
> +++ b/fs/hostfs/hostfs_kern.c
> @@ -382,8 +382,8 @@ static const struct file_operations hostfs_file_fops = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .splice_read = generic_file_splice_read,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .write = do_sync_write,
> .mmap = generic_file_mmap,
> .open = hostfs_file_open,
> diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c
> index fbfe2df..efc8cd9 100644
> --- a/fs/hpfs/file.c
> +++ b/fs/hpfs/file.c
> @@ -162,9 +162,9 @@ const struct file_operations hpfs_file_ops =
> {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = hpfs_file_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .release = hpfs_file_release,
> .fsync = hpfs_file_fsync,
> diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
> index 1506673..1d7ab8b 100644
> --- a/fs/jffs2/file.c
> +++ b/fs/jffs2/file.c
> @@ -51,10 +51,10 @@ const struct file_operations jffs2_file_operations =
> {
> .llseek = generic_file_llseek,
> .open = generic_file_open,
> - .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> - .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .read = do_sync_read,
> + .read_iter = generic_file_read_iter,
> + .write = do_sync_write,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl=jffs2_ioctl,
> .mmap = generic_file_readonly_mmap,
> .fsync = jffs2_fsync,
> diff --git a/fs/jfs/file.c b/fs/jfs/file.c
> index dd7442c..040b6c7 100644
> --- a/fs/jfs/file.c
> +++ b/fs/jfs/file.c
> @@ -151,8 +151,8 @@ const struct file_operations jfs_file_operations = {
> .llseek = generic_file_llseek,
> .write = do_sync_write,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> .splice_write = generic_file_splice_write,
> diff --git a/fs/logfs/file.c b/fs/logfs/file.c
> index 3886cde..ca35c88 100644
> --- a/fs/logfs/file.c
> +++ b/fs/logfs/file.c
> @@ -263,8 +263,8 @@ const struct inode_operations logfs_reg_iops = {
> };
>
> const struct file_operations logfs_reg_fops = {
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .fsync = logfs_fsync,
> .unlocked_ioctl = logfs_ioctl,
> .llseek = generic_file_llseek,
> diff --git a/fs/minix/file.c b/fs/minix/file.c
> index adc6f54..346d8f37 100644
> --- a/fs/minix/file.c
> +++ b/fs/minix/file.c
> @@ -15,9 +15,9 @@
> const struct file_operations minix_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c
> index 6194688..3e4337e 100644
> --- a/fs/nilfs2/file.c
> +++ b/fs/nilfs2/file.c
> @@ -153,8 +153,8 @@ const struct file_operations nilfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl = nilfs_ioctl,
> #ifdef CONFIG_COMPAT
> .compat_ioctl = nilfs_compat_ioctl,
> diff --git a/fs/omfs/file.c b/fs/omfs/file.c
> index e0d9b3e..badafd8 100644
> --- a/fs/omfs/file.c
> +++ b/fs/omfs/file.c
> @@ -339,8 +339,8 @@ const struct file_operations omfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/ramfs/file-mmu.c b/fs/ramfs/file-mmu.c
> index 4884ac5..c4d8572 100644
> --- a/fs/ramfs/file-mmu.c
> +++ b/fs/ramfs/file-mmu.c
> @@ -39,9 +39,9 @@ const struct address_space_operations ramfs_aops = {
>
> const struct file_operations ramfs_file_operations = {
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = noop_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
> index d5378d0..1d6be6c 100644
> --- a/fs/ramfs/file-nommu.c
> +++ b/fs/ramfs/file-nommu.c
> @@ -39,9 +39,9 @@ const struct file_operations ramfs_file_operations = {
> .mmap = ramfs_nommu_mmap,
> .get_unmapped_area = ramfs_nommu_get_unmapped_area,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .fsync = noop_fsync,
> .splice_read = generic_file_splice_read,
> .splice_write = generic_file_splice_write,
> diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c
> index 50302d6..831703d 100644
> --- a/fs/reiserfs/file.c
> +++ b/fs/reiserfs/file.c
> @@ -304,8 +304,8 @@ const struct file_operations reiserfs_file_operations = {
> .open = reiserfs_file_open,
> .release = reiserfs_file_release,
> .fsync = reiserfs_sync_file,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .splice_read = generic_file_splice_read,
> .splice_write = generic_file_splice_write,
> .llseek = generic_file_llseek,
> diff --git a/fs/romfs/mmap-nommu.c b/fs/romfs/mmap-nommu.c
> index e1a7779..e34d51a 100644
> --- a/fs/romfs/mmap-nommu.c
> +++ b/fs/romfs/mmap-nommu.c
> @@ -70,7 +70,7 @@ static int romfs_mmap(struct file *file, struct vm_area_struct *vma)
> const struct file_operations romfs_ro_fops = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .splice_read = generic_file_splice_read,
> .mmap = romfs_mmap,
> .get_unmapped_area = romfs_get_unmapped_area,
> diff --git a/fs/sysv/file.c b/fs/sysv/file.c
> index 9d4dc68..ff4b363 100644
> --- a/fs/sysv/file.c
> +++ b/fs/sysv/file.c
> @@ -22,9 +22,9 @@
> const struct file_operations sysv_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/ufs/file.c b/fs/ufs/file.c
> index 33afa20..e155e4c 100644
> --- a/fs/ufs/file.c
> +++ b/fs/ufs/file.c
> @@ -36,9 +36,9 @@
> const struct file_operations ufs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .open = generic_file_open,
> .fsync = generic_file_fsync,
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply
* Re: [PATCH V5 18/30] fs: add read_iter and write_iter to several file systems
From: Boaz Harrosh @ 2013-01-10 12:40 UTC (permalink / raw)
To: Dave Kleikamp
Cc: jfs-discussion, Jan Kara, Bob Copeland, linux-karma-devel,
linux-mtd, Mikulas Patocka, linux-nilfs, Richard Weinberger,
Christoph Hellwig, v9fs-developer, linux-ext4, Jeff Dike,
Evgeniy Dushistov, user-mode-linux-devel, Prasad Joshi,
reiserfs-devel, osd-dev, OGAWA Hirofumi, Joern Engel,
Tigran A. Aivazian, linux-kernel, logfs, Benny Halevy,
linux-fsdevel, Andreas Dilger
In-Reply-To: <1357761525-22718-19-git-send-email-dave.kleikamp@oracle.com>
On 01/09/2013 09:58 PM, Dave Kleikamp wrote:
> These are the simple ones.
>
> File systems that use generic_file_aio_read() and generic_file_aio_write()
> can trivially support generic_file_read_iter() and generic_file_write_iter().
>
> This patch adds those file_operations for 9p, adfs, affs, bfs, exofs, ext2,
> ext3, fat, f2fs, hfs, hfsplus, hostfs, hpfs, jfs, jffs2, logfs, minix, nilfs2,
> omfs, ramfs, reiserfs, romfs, sysv, and ufs.
>
> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> Cc: Zach Brown <zab@zabbo.net>
> Cc: v9fs-developer@lists.sourceforge.net
> Cc: Tigran A. Aivazian <tigran@aivazian.fsnet.co.uk>
> Cc: Jan Kara <jack@suse.cz>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Andreas Dilger <adilger.kernel@dilger.ca>
> Cc: linux-ext4@vger.kernel.org
> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Thanks looks good.
ACK-by: Boaz Harrosh <bharrosh@panasas.com>
> Cc: Boaz Harrosh <bharrosh@panasas.com>
> Cc: Benny Halevy <bhalevy@tonian.com>
> Cc: osd-dev@open-osd.org
> Cc: Jeff Dike <jdike@addtoit.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: user-mode-linux-devel@lists.sourceforge.net
> Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
> Cc: jfs-discussion@lists.sourceforge.net
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: linux-mtd@lists.infradead.org
> Cc: Joern Engel <joern@logfs.org>
> Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
> Cc: logfs@logfs.org
> Cc: linux-nilfs@vger.kernel.org
> Cc: Bob Copeland <me@bobcopeland.com>
> Cc: linux-karma-devel@lists.sourceforge.net
> Cc: reiserfs-devel@vger.kernel.org
> Cc: Christoph Hellwig <hch@infradead.org>
> Cc: Evgeniy Dushistov <dushistov@mail.ru>
> ---
> fs/9p/vfs_addr.c | 4 ++--
> fs/9p/vfs_file.c | 8 ++++----
> fs/adfs/file.c | 4 ++--
> fs/affs/file.c | 4 ++--
> fs/bfs/file.c | 4 ++--
> fs/exofs/file.c | 4 ++--
> fs/ext2/file.c | 4 ++--
> fs/ext3/file.c | 4 ++--
> fs/f2fs/file.c | 4 ++--
> fs/fat/file.c | 4 ++--
> fs/hfs/inode.c | 4 ++--
> fs/hfsplus/inode.c | 4 ++--
> fs/hostfs/hostfs_kern.c | 4 ++--
> fs/hpfs/file.c | 4 ++--
> fs/jffs2/file.c | 8 ++++----
> fs/jfs/file.c | 4 ++--
> fs/logfs/file.c | 4 ++--
> fs/minix/file.c | 4 ++--
> fs/nilfs2/file.c | 4 ++--
> fs/omfs/file.c | 4 ++--
> fs/ramfs/file-mmu.c | 4 ++--
> fs/ramfs/file-nommu.c | 4 ++--
> fs/reiserfs/file.c | 4 ++--
> fs/romfs/mmap-nommu.c | 2 +-
> fs/sysv/file.c | 4 ++--
> fs/ufs/file.c | 4 ++--
> 26 files changed, 55 insertions(+), 55 deletions(-)
>
> diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
> index e70f239..01c0673 100644
> --- a/fs/9p/vfs_addr.c
> +++ b/fs/9p/vfs_addr.c
> @@ -249,8 +249,8 @@ static int v9fs_launder_page(struct page *page)
> * the VFS gets them, so this method should never be called.
> *
> * Direct IO is not 'yet' supported in the cached mode. Hence when
> - * this routine is called through generic_file_aio_read(), the read/write fails
> - * with an error.
> + * this routine is called through generic_file_read_iter(), the read/write
> + * fails with an error.
> *
> */
> static ssize_t
> diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
> index c2483e9..2e9441d 100644
> --- a/fs/9p/vfs_file.c
> +++ b/fs/9p/vfs_file.c
> @@ -746,8 +746,8 @@ const struct file_operations v9fs_cached_file_operations = {
> .llseek = generic_file_llseek,
> .read = v9fs_cached_file_read,
> .write = v9fs_cached_file_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .open = v9fs_file_open,
> .release = v9fs_dir_release,
> .lock = v9fs_file_lock,
> @@ -759,8 +759,8 @@ const struct file_operations v9fs_cached_file_operations_dotl = {
> .llseek = generic_file_llseek,
> .read = v9fs_cached_file_read,
> .write = v9fs_cached_file_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .open = v9fs_file_open,
> .release = v9fs_dir_release,
> .lock = v9fs_file_lock_dotl,
> diff --git a/fs/adfs/file.c b/fs/adfs/file.c
> index a36da53..da1e021 100644
> --- a/fs/adfs/file.c
> +++ b/fs/adfs/file.c
> @@ -24,11 +24,11 @@
> const struct file_operations adfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .splice_read = generic_file_splice_read,
> };
>
> diff --git a/fs/affs/file.c b/fs/affs/file.c
> index af3261b..d09a2db 100644
> --- a/fs/affs/file.c
> +++ b/fs/affs/file.c
> @@ -28,9 +28,9 @@ static int affs_file_release(struct inode *inode, struct file *filp);
> const struct file_operations affs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .open = affs_file_open,
> .release = affs_file_release,
> diff --git a/fs/bfs/file.c b/fs/bfs/file.c
> index ad3ea14..3d14806 100644
> --- a/fs/bfs/file.c
> +++ b/fs/bfs/file.c
> @@ -24,9 +24,9 @@
> const struct file_operations bfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> };
> diff --git a/fs/exofs/file.c b/fs/exofs/file.c
> index 491c6c0..20564f8a 100644
> --- a/fs/exofs/file.c
> +++ b/fs/exofs/file.c
> @@ -69,8 +69,8 @@ const struct file_operations exofs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .open = generic_file_open,
> .release = exofs_release_file,
> diff --git a/fs/ext2/file.c b/fs/ext2/file.c
> index a5b3a5d..6af043b 100644
> --- a/fs/ext2/file.c
> +++ b/fs/ext2/file.c
> @@ -64,8 +64,8 @@ const struct file_operations ext2_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl = ext2_ioctl,
> #ifdef CONFIG_COMPAT
> .compat_ioctl = ext2_compat_ioctl,
> diff --git a/fs/ext3/file.c b/fs/ext3/file.c
> index 25cb413..a796771 100644
> --- a/fs/ext3/file.c
> +++ b/fs/ext3/file.c
> @@ -52,8 +52,8 @@ const struct file_operations ext3_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl = ext3_ioctl,
> #ifdef CONFIG_COMPAT
> .compat_ioctl = ext3_compat_ioctl,
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index f9e085d..86d9c4b 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -624,8 +624,8 @@ const struct file_operations f2fs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .open = generic_file_open,
> .mmap = f2fs_file_mmap,
> .fsync = f2fs_sync_file,
> diff --git a/fs/fat/file.c b/fs/fat/file.c
> index a62e0ec..92d587b 100644
> --- a/fs/fat/file.c
> +++ b/fs/fat/file.c
> @@ -164,8 +164,8 @@ const struct file_operations fat_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .release = fat_file_release,
> .unlocked_ioctl = fat_generic_ioctl,
> diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
> index 2a87ba4..0db0679 100644
> --- a/fs/hfs/inode.c
> +++ b/fs/hfs/inode.c
> @@ -666,9 +666,9 @@ static int hfs_file_fsync(struct file *filp, loff_t start, loff_t end,
> static const struct file_operations hfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> .fsync = hfs_file_fsync,
> diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
> index c87b26c..9b8cdb6 100644
> --- a/fs/hfsplus/inode.c
> +++ b/fs/hfsplus/inode.c
> @@ -373,9 +373,9 @@ static const struct inode_operations hfsplus_file_inode_operations = {
> static const struct file_operations hfsplus_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> .fsync = hfsplus_file_fsync,
> diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
> index 457addc..4593a9a 100644
> --- a/fs/hostfs/hostfs_kern.c
> +++ b/fs/hostfs/hostfs_kern.c
> @@ -382,8 +382,8 @@ static const struct file_operations hostfs_file_fops = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .splice_read = generic_file_splice_read,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .write = do_sync_write,
> .mmap = generic_file_mmap,
> .open = hostfs_file_open,
> diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c
> index fbfe2df..efc8cd9 100644
> --- a/fs/hpfs/file.c
> +++ b/fs/hpfs/file.c
> @@ -162,9 +162,9 @@ const struct file_operations hpfs_file_ops =
> {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = hpfs_file_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .release = hpfs_file_release,
> .fsync = hpfs_file_fsync,
> diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
> index 1506673..1d7ab8b 100644
> --- a/fs/jffs2/file.c
> +++ b/fs/jffs2/file.c
> @@ -51,10 +51,10 @@ const struct file_operations jffs2_file_operations =
> {
> .llseek = generic_file_llseek,
> .open = generic_file_open,
> - .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> - .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .read = do_sync_read,
> + .read_iter = generic_file_read_iter,
> + .write = do_sync_write,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl=jffs2_ioctl,
> .mmap = generic_file_readonly_mmap,
> .fsync = jffs2_fsync,
> diff --git a/fs/jfs/file.c b/fs/jfs/file.c
> index dd7442c..040b6c7 100644
> --- a/fs/jfs/file.c
> +++ b/fs/jfs/file.c
> @@ -151,8 +151,8 @@ const struct file_operations jfs_file_operations = {
> .llseek = generic_file_llseek,
> .write = do_sync_write,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> .splice_write = generic_file_splice_write,
> diff --git a/fs/logfs/file.c b/fs/logfs/file.c
> index 3886cde..ca35c88 100644
> --- a/fs/logfs/file.c
> +++ b/fs/logfs/file.c
> @@ -263,8 +263,8 @@ const struct inode_operations logfs_reg_iops = {
> };
>
> const struct file_operations logfs_reg_fops = {
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .fsync = logfs_fsync,
> .unlocked_ioctl = logfs_ioctl,
> .llseek = generic_file_llseek,
> diff --git a/fs/minix/file.c b/fs/minix/file.c
> index adc6f54..346d8f37 100644
> --- a/fs/minix/file.c
> +++ b/fs/minix/file.c
> @@ -15,9 +15,9 @@
> const struct file_operations minix_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c
> index 6194688..3e4337e 100644
> --- a/fs/nilfs2/file.c
> +++ b/fs/nilfs2/file.c
> @@ -153,8 +153,8 @@ const struct file_operations nilfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl = nilfs_ioctl,
> #ifdef CONFIG_COMPAT
> .compat_ioctl = nilfs_compat_ioctl,
> diff --git a/fs/omfs/file.c b/fs/omfs/file.c
> index e0d9b3e..badafd8 100644
> --- a/fs/omfs/file.c
> +++ b/fs/omfs/file.c
> @@ -339,8 +339,8 @@ const struct file_operations omfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/ramfs/file-mmu.c b/fs/ramfs/file-mmu.c
> index 4884ac5..c4d8572 100644
> --- a/fs/ramfs/file-mmu.c
> +++ b/fs/ramfs/file-mmu.c
> @@ -39,9 +39,9 @@ const struct address_space_operations ramfs_aops = {
>
> const struct file_operations ramfs_file_operations = {
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = noop_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
> index d5378d0..1d6be6c 100644
> --- a/fs/ramfs/file-nommu.c
> +++ b/fs/ramfs/file-nommu.c
> @@ -39,9 +39,9 @@ const struct file_operations ramfs_file_operations = {
> .mmap = ramfs_nommu_mmap,
> .get_unmapped_area = ramfs_nommu_get_unmapped_area,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .fsync = noop_fsync,
> .splice_read = generic_file_splice_read,
> .splice_write = generic_file_splice_write,
> diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c
> index 50302d6..831703d 100644
> --- a/fs/reiserfs/file.c
> +++ b/fs/reiserfs/file.c
> @@ -304,8 +304,8 @@ const struct file_operations reiserfs_file_operations = {
> .open = reiserfs_file_open,
> .release = reiserfs_file_release,
> .fsync = reiserfs_sync_file,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .splice_read = generic_file_splice_read,
> .splice_write = generic_file_splice_write,
> .llseek = generic_file_llseek,
> diff --git a/fs/romfs/mmap-nommu.c b/fs/romfs/mmap-nommu.c
> index e1a7779..e34d51a 100644
> --- a/fs/romfs/mmap-nommu.c
> +++ b/fs/romfs/mmap-nommu.c
> @@ -70,7 +70,7 @@ static int romfs_mmap(struct file *file, struct vm_area_struct *vma)
> const struct file_operations romfs_ro_fops = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .splice_read = generic_file_splice_read,
> .mmap = romfs_mmap,
> .get_unmapped_area = romfs_get_unmapped_area,
> diff --git a/fs/sysv/file.c b/fs/sysv/file.c
> index 9d4dc68..ff4b363 100644
> --- a/fs/sysv/file.c
> +++ b/fs/sysv/file.c
> @@ -22,9 +22,9 @@
> const struct file_operations sysv_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/ufs/file.c b/fs/ufs/file.c
> index 33afa20..e155e4c 100644
> --- a/fs/ufs/file.c
> +++ b/fs/ufs/file.c
> @@ -36,9 +36,9 @@
> const struct file_operations ufs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .open = generic_file_open,
> .fsync = generic_file_fsync,
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply
* Re: [uml-devel] [PATCH V5 18/30] fs: add read_iter and write_iter to several file systems
From: Boaz Harrosh @ 2013-01-10 12:40 UTC (permalink / raw)
To: Dave Kleikamp
Cc: jfs-discussion, Jan Kara, Bob Copeland, linux-karma-devel,
linux-mtd, Mikulas Patocka, Joern, linux-nilfs, Zach,
Richard Weinberger, Christoph Hellwig, v9fs-developer, linux-ext4,
Engel, Evgeniy Dushistov, user-mode-linux-devel, Jeff Dike,
reiserfs-devel, osd-dev, OGAWA Hirofumi, Prasad Joshi,
Tigran A. Aivazian, linux-kernel, logfs, Benny Halevy,
linux-fsdevel, Andreas Dilger, Andrew Morton, Brown,
David Woodhouse, Maxim V. Patlasov
In-Reply-To: <1357761525-22718-19-git-send-email-dave.kleikamp@oracle.com>
On 01/09/2013 09:58 PM, Dave Kleikamp wrote:
> These are the simple ones.
>
> File systems that use generic_file_aio_read() and generic_file_aio_write()
> can trivially support generic_file_read_iter() and generic_file_write_iter().
>
> This patch adds those file_operations for 9p, adfs, affs, bfs, exofs, ext2,
> ext3, fat, f2fs, hfs, hfsplus, hostfs, hpfs, jfs, jffs2, logfs, minix, nilfs2,
> omfs, ramfs, reiserfs, romfs, sysv, and ufs.
>
> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> Cc: Zach Brown <zab@zabbo.net>
> Cc: v9fs-developer@lists.sourceforge.net
> Cc: Tigran A. Aivazian <tigran@aivazian.fsnet.co.uk>
> Cc: Jan Kara <jack@suse.cz>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Andreas Dilger <adilger.kernel@dilger.ca>
> Cc: linux-ext4@vger.kernel.org
> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Thanks looks good.
ACK-by: Boaz Harrosh <bharrosh@panasas.com>
> Cc: Boaz Harrosh <bharrosh@panasas.com>
> Cc: Benny Halevy <bhalevy@tonian.com>
> Cc: osd-dev@open-osd.org
> Cc: Jeff Dike <jdike@addtoit.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: user-mode-linux-devel@lists.sourceforge.net
> Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
> Cc: jfs-discussion@lists.sourceforge.net
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: linux-mtd@lists.infradead.org
> Cc: Joern Engel <joern@logfs.org>
> Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
> Cc: logfs@logfs.org
> Cc: linux-nilfs@vger.kernel.org
> Cc: Bob Copeland <me@bobcopeland.com>
> Cc: linux-karma-devel@lists.sourceforge.net
> Cc: reiserfs-devel@vger.kernel.org
> Cc: Christoph Hellwig <hch@infradead.org>
> Cc: Evgeniy Dushistov <dushistov@mail.ru>
> ---
> fs/9p/vfs_addr.c | 4 ++--
> fs/9p/vfs_file.c | 8 ++++----
> fs/adfs/file.c | 4 ++--
> fs/affs/file.c | 4 ++--
> fs/bfs/file.c | 4 ++--
> fs/exofs/file.c | 4 ++--
> fs/ext2/file.c | 4 ++--
> fs/ext3/file.c | 4 ++--
> fs/f2fs/file.c | 4 ++--
> fs/fat/file.c | 4 ++--
> fs/hfs/inode.c | 4 ++--
> fs/hfsplus/inode.c | 4 ++--
> fs/hostfs/hostfs_kern.c | 4 ++--
> fs/hpfs/file.c | 4 ++--
> fs/jffs2/file.c | 8 ++++----
> fs/jfs/file.c | 4 ++--
> fs/logfs/file.c | 4 ++--
> fs/minix/file.c | 4 ++--
> fs/nilfs2/file.c | 4 ++--
> fs/omfs/file.c | 4 ++--
> fs/ramfs/file-mmu.c | 4 ++--
> fs/ramfs/file-nommu.c | 4 ++--
> fs/reiserfs/file.c | 4 ++--
> fs/romfs/mmap-nommu.c | 2 +-
> fs/sysv/file.c | 4 ++--
> fs/ufs/file.c | 4 ++--
> 26 files changed, 55 insertions(+), 55 deletions(-)
>
> diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
> index e70f239..01c0673 100644
> --- a/fs/9p/vfs_addr.c
> +++ b/fs/9p/vfs_addr.c
> @@ -249,8 +249,8 @@ static int v9fs_launder_page(struct page *page)
> * the VFS gets them, so this method should never be called.
> *
> * Direct IO is not 'yet' supported in the cached mode. Hence when
> - * this routine is called through generic_file_aio_read(), the read/write fails
> - * with an error.
> + * this routine is called through generic_file_read_iter(), the read/write
> + * fails with an error.
> *
> */
> static ssize_t
> diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
> index c2483e9..2e9441d 100644
> --- a/fs/9p/vfs_file.c
> +++ b/fs/9p/vfs_file.c
> @@ -746,8 +746,8 @@ const struct file_operations v9fs_cached_file_operations = {
> .llseek = generic_file_llseek,
> .read = v9fs_cached_file_read,
> .write = v9fs_cached_file_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .open = v9fs_file_open,
> .release = v9fs_dir_release,
> .lock = v9fs_file_lock,
> @@ -759,8 +759,8 @@ const struct file_operations v9fs_cached_file_operations_dotl = {
> .llseek = generic_file_llseek,
> .read = v9fs_cached_file_read,
> .write = v9fs_cached_file_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .open = v9fs_file_open,
> .release = v9fs_dir_release,
> .lock = v9fs_file_lock_dotl,
> diff --git a/fs/adfs/file.c b/fs/adfs/file.c
> index a36da53..da1e021 100644
> --- a/fs/adfs/file.c
> +++ b/fs/adfs/file.c
> @@ -24,11 +24,11 @@
> const struct file_operations adfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .splice_read = generic_file_splice_read,
> };
>
> diff --git a/fs/affs/file.c b/fs/affs/file.c
> index af3261b..d09a2db 100644
> --- a/fs/affs/file.c
> +++ b/fs/affs/file.c
> @@ -28,9 +28,9 @@ static int affs_file_release(struct inode *inode, struct file *filp);
> const struct file_operations affs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .open = affs_file_open,
> .release = affs_file_release,
> diff --git a/fs/bfs/file.c b/fs/bfs/file.c
> index ad3ea14..3d14806 100644
> --- a/fs/bfs/file.c
> +++ b/fs/bfs/file.c
> @@ -24,9 +24,9 @@
> const struct file_operations bfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> };
> diff --git a/fs/exofs/file.c b/fs/exofs/file.c
> index 491c6c0..20564f8a 100644
> --- a/fs/exofs/file.c
> +++ b/fs/exofs/file.c
> @@ -69,8 +69,8 @@ const struct file_operations exofs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .open = generic_file_open,
> .release = exofs_release_file,
> diff --git a/fs/ext2/file.c b/fs/ext2/file.c
> index a5b3a5d..6af043b 100644
> --- a/fs/ext2/file.c
> +++ b/fs/ext2/file.c
> @@ -64,8 +64,8 @@ const struct file_operations ext2_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl = ext2_ioctl,
> #ifdef CONFIG_COMPAT
> .compat_ioctl = ext2_compat_ioctl,
> diff --git a/fs/ext3/file.c b/fs/ext3/file.c
> index 25cb413..a796771 100644
> --- a/fs/ext3/file.c
> +++ b/fs/ext3/file.c
> @@ -52,8 +52,8 @@ const struct file_operations ext3_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl = ext3_ioctl,
> #ifdef CONFIG_COMPAT
> .compat_ioctl = ext3_compat_ioctl,
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index f9e085d..86d9c4b 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -624,8 +624,8 @@ const struct file_operations f2fs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .open = generic_file_open,
> .mmap = f2fs_file_mmap,
> .fsync = f2fs_sync_file,
> diff --git a/fs/fat/file.c b/fs/fat/file.c
> index a62e0ec..92d587b 100644
> --- a/fs/fat/file.c
> +++ b/fs/fat/file.c
> @@ -164,8 +164,8 @@ const struct file_operations fat_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .release = fat_file_release,
> .unlocked_ioctl = fat_generic_ioctl,
> diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
> index 2a87ba4..0db0679 100644
> --- a/fs/hfs/inode.c
> +++ b/fs/hfs/inode.c
> @@ -666,9 +666,9 @@ static int hfs_file_fsync(struct file *filp, loff_t start, loff_t end,
> static const struct file_operations hfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> .fsync = hfs_file_fsync,
> diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
> index c87b26c..9b8cdb6 100644
> --- a/fs/hfsplus/inode.c
> +++ b/fs/hfsplus/inode.c
> @@ -373,9 +373,9 @@ static const struct inode_operations hfsplus_file_inode_operations = {
> static const struct file_operations hfsplus_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> .fsync = hfsplus_file_fsync,
> diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
> index 457addc..4593a9a 100644
> --- a/fs/hostfs/hostfs_kern.c
> +++ b/fs/hostfs/hostfs_kern.c
> @@ -382,8 +382,8 @@ static const struct file_operations hostfs_file_fops = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .splice_read = generic_file_splice_read,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .write = do_sync_write,
> .mmap = generic_file_mmap,
> .open = hostfs_file_open,
> diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c
> index fbfe2df..efc8cd9 100644
> --- a/fs/hpfs/file.c
> +++ b/fs/hpfs/file.c
> @@ -162,9 +162,9 @@ const struct file_operations hpfs_file_ops =
> {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = hpfs_file_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .release = hpfs_file_release,
> .fsync = hpfs_file_fsync,
> diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
> index 1506673..1d7ab8b 100644
> --- a/fs/jffs2/file.c
> +++ b/fs/jffs2/file.c
> @@ -51,10 +51,10 @@ const struct file_operations jffs2_file_operations =
> {
> .llseek = generic_file_llseek,
> .open = generic_file_open,
> - .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> - .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .read = do_sync_read,
> + .read_iter = generic_file_read_iter,
> + .write = do_sync_write,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl=jffs2_ioctl,
> .mmap = generic_file_readonly_mmap,
> .fsync = jffs2_fsync,
> diff --git a/fs/jfs/file.c b/fs/jfs/file.c
> index dd7442c..040b6c7 100644
> --- a/fs/jfs/file.c
> +++ b/fs/jfs/file.c
> @@ -151,8 +151,8 @@ const struct file_operations jfs_file_operations = {
> .llseek = generic_file_llseek,
> .write = do_sync_write,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .splice_read = generic_file_splice_read,
> .splice_write = generic_file_splice_write,
> diff --git a/fs/logfs/file.c b/fs/logfs/file.c
> index 3886cde..ca35c88 100644
> --- a/fs/logfs/file.c
> +++ b/fs/logfs/file.c
> @@ -263,8 +263,8 @@ const struct inode_operations logfs_reg_iops = {
> };
>
> const struct file_operations logfs_reg_fops = {
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .fsync = logfs_fsync,
> .unlocked_ioctl = logfs_ioctl,
> .llseek = generic_file_llseek,
> diff --git a/fs/minix/file.c b/fs/minix/file.c
> index adc6f54..346d8f37 100644
> --- a/fs/minix/file.c
> +++ b/fs/minix/file.c
> @@ -15,9 +15,9 @@
> const struct file_operations minix_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c
> index 6194688..3e4337e 100644
> --- a/fs/nilfs2/file.c
> +++ b/fs/nilfs2/file.c
> @@ -153,8 +153,8 @@ const struct file_operations nilfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .unlocked_ioctl = nilfs_ioctl,
> #ifdef CONFIG_COMPAT
> .compat_ioctl = nilfs_compat_ioctl,
> diff --git a/fs/omfs/file.c b/fs/omfs/file.c
> index e0d9b3e..badafd8 100644
> --- a/fs/omfs/file.c
> +++ b/fs/omfs/file.c
> @@ -339,8 +339,8 @@ const struct file_operations omfs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> .write = do_sync_write,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/ramfs/file-mmu.c b/fs/ramfs/file-mmu.c
> index 4884ac5..c4d8572 100644
> --- a/fs/ramfs/file-mmu.c
> +++ b/fs/ramfs/file-mmu.c
> @@ -39,9 +39,9 @@ const struct address_space_operations ramfs_aops = {
>
> const struct file_operations ramfs_file_operations = {
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = noop_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
> index d5378d0..1d6be6c 100644
> --- a/fs/ramfs/file-nommu.c
> +++ b/fs/ramfs/file-nommu.c
> @@ -39,9 +39,9 @@ const struct file_operations ramfs_file_operations = {
> .mmap = ramfs_nommu_mmap,
> .get_unmapped_area = ramfs_nommu_get_unmapped_area,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .fsync = noop_fsync,
> .splice_read = generic_file_splice_read,
> .splice_write = generic_file_splice_write,
> diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c
> index 50302d6..831703d 100644
> --- a/fs/reiserfs/file.c
> +++ b/fs/reiserfs/file.c
> @@ -304,8 +304,8 @@ const struct file_operations reiserfs_file_operations = {
> .open = reiserfs_file_open,
> .release = reiserfs_file_release,
> .fsync = reiserfs_sync_file,
> - .aio_read = generic_file_aio_read,
> - .aio_write = generic_file_aio_write,
> + .read_iter = generic_file_read_iter,
> + .write_iter = generic_file_write_iter,
> .splice_read = generic_file_splice_read,
> .splice_write = generic_file_splice_write,
> .llseek = generic_file_llseek,
> diff --git a/fs/romfs/mmap-nommu.c b/fs/romfs/mmap-nommu.c
> index e1a7779..e34d51a 100644
> --- a/fs/romfs/mmap-nommu.c
> +++ b/fs/romfs/mmap-nommu.c
> @@ -70,7 +70,7 @@ static int romfs_mmap(struct file *file, struct vm_area_struct *vma)
> const struct file_operations romfs_ro_fops = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .splice_read = generic_file_splice_read,
> .mmap = romfs_mmap,
> .get_unmapped_area = romfs_get_unmapped_area,
> diff --git a/fs/sysv/file.c b/fs/sysv/file.c
> index 9d4dc68..ff4b363 100644
> --- a/fs/sysv/file.c
> +++ b/fs/sysv/file.c
> @@ -22,9 +22,9 @@
> const struct file_operations sysv_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .fsync = generic_file_fsync,
> .splice_read = generic_file_splice_read,
> diff --git a/fs/ufs/file.c b/fs/ufs/file.c
> index 33afa20..e155e4c 100644
> --- a/fs/ufs/file.c
> +++ b/fs/ufs/file.c
> @@ -36,9 +36,9 @@
> const struct file_operations ufs_file_operations = {
> .llseek = generic_file_llseek,
> .read = do_sync_read,
> - .aio_read = generic_file_aio_read,
> + .read_iter = generic_file_read_iter,
> .write = do_sync_write,
> - .aio_write = generic_file_aio_write,
> + .write_iter = generic_file_write_iter,
> .mmap = generic_file_mmap,
> .open = generic_file_open,
> .fsync = generic_file_fsync,
>
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply
* Re: [Qemu-devel] [PATCH V2 07/10] snapshot: qmp use new internal API for external snapshot transaction
From: Stefan Hajnoczi @ 2013-01-10 12:41 UTC (permalink / raw)
To: Wenchao Xia
Cc: kwolf, aliguori, quintela, qemu-devel, lcapitulino, pbonzini,
dietmar
In-Reply-To: <50EE33B2.4040504@linux.vnet.ibm.com>
On Thu, Jan 10, 2013 at 11:21:22AM +0800, Wenchao Xia wrote:
> 于 2013-1-9 20:44, Stefan Hajnoczi 写道:
> >On Mon, Jan 07, 2013 at 03:28:06PM +0800, Wenchao Xia wrote:
> >> This patch switch to internal common API to take group external
> >>snapshots from qmp_transaction interface. qmp layer simply does
> >>a translation from user input.
> >>
> >>Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> >>---
> >> blockdev.c | 215 ++++++++++++++++++++++++------------------------------------
> >> 1 files changed, 87 insertions(+), 128 deletions(-)
> >
> >An internal API for snapshots is not necessary. qmp_transaction() is
> >already usable both from the monitor and C code.
> >
> >The QAPI code generator creates structs that can be accessed directly
> >from C. qmp_transaction(), BlockdevAction, and BlockdevActionList *is*
> >the snapshot API. It just doesn't support internal snapshots yet, which
> >is what you are trying to add.
> >
> >To add internal snapshot support, define a BlockdevInternalSnapshot type
> >in qapi-schema.json and add internal snapshot support in
> >qmp_transaction().
> >
> >qmp_transaction() was designed with this in mind from the beginning and
> >dispatches based on BlockdevAction->kind.
> >
> >The patch series will become much smaller while still adding internal
> >snapshot support.
> >
> >Stefan
> >
>
> As API, qmp_transaction have following disadvantages:
> 1) interface is based on string not data type inside qemu, that means
> other function calling it result in: bdrv->string->bdrv
Use bdrv_get_device_name(). You already need to fill in filename or
snapshot name strings. This is not a big disadvantage.
> 2) all capability are forced to be exposed.
Is there something you cannot expose?
> 3) need structure to record each transaction state, such as
> BlkTransactionStates. Extending it is equal to add an internal layer.
I agree that extending it is equal coding effort to adding an internal
layer because you'll need to refactor qmp_transaction() a bit to really
support additional action types.
But it's the right thing to do. Don't add unnecessary layers just
because writing new code is more fun than extending existing code.
> Actually I started up by use qmp_transaction as API, but soon
> found that work is almost done around BlkTransactionStates, so
> added a layer around it clearly.
BlkTransactionStates is only relevant to external snapshots because they
change the BlkDriverState chain and must be able to undo that.
For internal snapshots you simply need to store the snapshot name so you
can delete it if there is an error partway through. (BTW it's not
possible to completely restore state if you allow overwriting existing
internal snapshots unless you do something like taking a backup snapshot
of the existing snapshot first!)
Stefan
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
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.