summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nfsd: allow turning off nfsv3 readdir_plusRajesh Ghanekar2014-08-183-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | One of our customer's application only needs file names, not file attributes. With directories having 10K+ inodes (assuming buffer cache has directory blocks cached having file names, but inode cache is limited and hence need eviction of older cached inodes), older inodes are evicted periodically. So if they keep on doing readdir(2) from NSF client on multiple directories, some directory's files are periodically removed from inode cache and hence new readdir(2) on same directory requires disk access to bring back inodes again to inode cache. As READDIRPLUS request fetches attributes also, doing getattr on each file on server, it causes unnecessary disk accesses. If READDIRPLUS on NFS client is returned with -ENOTSUPP, NFS client uses READDIR request which just gets the names of the files in a directory, not attributes, hence avoiding disk accesses on server. There's already a corresponding client-side mount option, but an export option reduces the need for configuration across multiple clients. This flag affects NFSv3 only. If it turns out it's needed for NFSv4 as well then we may have to figure out how to extend the behavior to NFSv4, but it's not currently obvious how to do that. Signed-off-by: Rajesh Ghanekar <rajesh_ghanekar@symantec.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd4: reserve adequate space for LOCK opJ. Bruce Fields2014-08-171-0/+8
| | | | | | | | | | | | | | | | | As of 8c7424cff6 "nfsd4: don't try to encode conflicting owner if low on space", we permit the server to process a LOCK operation even if there might not be space to return the conflicting lockowner, because we've made returning the conflicting lockowner optional. However, the rpc server still wants to know the most we might possibly return, so we need to take into account the possible conflicting lockowner in the svc_reserve_space() call here. Symptoms were log messages like "RPC request reserved 88 but used 108". Fixes: 8c7424cff6 "nfsd4: don't try to encode conflicting owner if low on space" Reported-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd4: remove obsolete commentJ. Bruce Fields2014-08-171-7/+0
| | | | | | We do what Neil suggests now. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd3: Check write permission after checking existenceRoss Lagerwall2014-08-171-5/+0
| | | | | | | | | | | When creating a file that already exists in a read-only directory with O_EXCL, the NFSv3 server returns EACCES rather than EEXIST (which local files and the NFSv4 server return). Fix this by checking the MAY_CREATE permission only if the file does not exist. Since this already happens in do_nfsd_create, the check in nfsd3_proc_create can simply be removed. Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: call nfs4_put_deleg_lease outside of state_lockJeff Layton2014-08-171-1/+5
| | | | | | | | | | | Currently, we hold the state_lock when releasing the lease. That's potentially problematic in the future if we allow for setlease methods that can sleep. Move the nfs4_put_deleg_lease call out of the delegation unhashing routine (which was always a bit goofy anyway), and into the unlocked sections of the callers of unhash_delegation_locked. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: protect lease-related nfs4_file fields with fi_lockJeff Layton2014-08-171-9/+13
| | | | | | | | | | | | | | | | | | | | | | Currently these fields are protected with the state_lock, but that doesn't really make a lot of sense. These fields are "private" to the nfs4_file, and can be protected with the more granular fi_lock. The fi_lock is already held when setting these fields. Make the code hold the fp->fi_lock when clearing the lease-related fields in the nfs4_file, and no longer require that the state_lock be held when calling into this function. To prevent lock inversion with the i_lock, we also move the vfs_setlease and fput calls outside of the fi_lock. This also sets us up for allowing vfs_setlease calls to block in the future. Finally, remove a redundant NULL pointer check. unhash_delegation_locked locks the fp->fi_lock prior to that check, so fp in that function must never be NULL. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: Reorder nfsd_cache_match to check more powerful discriminators firstTrond Myklebust2014-08-171-7/+11
| | | | | | | | | We would normally expect the xid and the checksum to be the best discriminators. Check them before looking at the procedure number, etc. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: split DRC global spinlock into per-bucket locksTrond Myklebust2014-08-171-23/+20
| | | | | Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: convert num_drc_entries to an atomic_tTrond Myklebust2014-08-171-16/+12
| | | | | | | ...so we can remove the spinlocking around it. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: Remove the cache_hash listTrond Myklebust2014-08-172-18/+2
| | | | | | | | Now that the lru list is per-bucket, we don't need a second list for searches. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: convert the lru list into a per-bucket thingTrond Myklebust2014-08-171-23/+50
| | | | | Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: Clean up drc cache in preparation for global spinlock eliminationTrond Myklebust2014-08-171-21/+24
| | | | | Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* SUNRPC: Optimise away svc_recv_availableTrond Myklebust2014-08-171-17/+6
| | | | | | | | | We really do not want to do ioctls in the server's fast path. Instead, let's use the fact that we managed to read a full record as the indicator that we should try to read the socket again. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* SUNRPC: More optimisations of svc_xprt_enqueue()Trond Myklebust2014-08-171-14/+7
| | | | | | | | Just move the transport locking out of the spin lock protected area altogether. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* SUNRPC: Fix broken kthread_should_stop test in svc_get_next_xprtTrond Myklebust2014-08-171-21/+10
| | | | | | | | | | We should definitely not be exiting svc_get_next_xprt() with the thread enqueued. Fix this by ensuring that we fall through to the dequeue. Also move the test itself outside the spin lock protected section. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* SUNRPC: get rid of the request wait queueTrond Myklebust2014-08-173-18/+17
| | | | | | | | | We're always _only_ waking up tasks from within the sp_threads list, so we know that they are enqueued and alive. The rq_wait waitqueue is just a distraction with extra atomic semantics. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* SUNRPC: Do not grab pool->sp_lock unnecessarily in svc_get_next_xprtTrond Myklebust2014-08-171-5/+10
| | | | | Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfs: Ensure that nfs_callback_start_svc sets the server rq_task...Trond Myklebust2014-08-171-0/+1
| | | | | Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Ensure that lockd_start_svc sets the server rq_task...Trond Myklebust2014-08-171-0/+2
| | | | | Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* SUNRPC: Do not override wspace tests in svc_handle_xprtTrond Myklebust2014-08-171-1/+1
| | | | | | | | We already determined that there was enough wspace when we called svc_xprt_enqueue. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* Linux 3.17-rc1v3.17-rc1Linus Torvalds2014-08-161-2/+2
|
* Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86Linus Torvalds2014-08-1624-108/+608
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull x86 platform driver updates from Matthew Garrett: "A moderate number of changes, but nothing awfully significant. A lot of const cleanups, some reworking and additions to the rfkill quirks in the asus driver, a new driver for generating falling laptop events on Toshibas and some misc fixes. Maybe vendors have stopped inventing things" * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: (41 commits) platform/x86: Enable build support for toshiba_haps Documentation: Add file about toshiba_haps module platform/x86: Toshiba HDD Active Protection Sensor asus-nb-wmi: Add wapf4 quirk for the U32U alienware-wmi: make hdmi_mux enabled on case-by-case basis ideapad-laptop: Constify DMI table and other r/o variables asus-nb-wmi.c: Rename x401u quirk to wapf4 compal-laptop: correct invalid hwmon name toshiba_acpi: Add Qosmio X75-A to the alt keymap dmi list toshiba_acpi: Add extra check to backlight code Fix log message about future removal of interface ideapad-laptop: Disable touchpad interface on Yoga models asus-nb-wmi: Add wapf4 quirk for the X550CC intel_ips: Make ips_mcp_limits variables static thinkpad_acpi: Mark volume_alsa_control_{vol,mute} as __initdata fujitsu-laptop: Mark fujitsu_dmi_table[] DMI table as __initconst hp-wmi: Add missing __init annotations to initialization code hp_accel: Constify ACPI and DMI tables fujitsu-tablet: Mark DMI callbacks as __init code dell-laptop: Mark dell_quirks[] DMI table as __initconst ...
| * platform/x86: Enable build support for toshiba_hapsAzael Avalos2014-08-162-0/+20
| | | | | | | | | | | | | | | | Makefile and Kconfig build support patch for the newly introduced kernel module toshiba_haps. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * Documentation: Add file about toshiba_haps moduleAzael Avalos2014-08-162-0/+78
| | | | | | | | | | | | | | | | This patch provides information about the Toshiba HDD Active Protection Sensor driver module toshiba_haps. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * platform/x86: Toshiba HDD Active Protection SensorAzael Avalos2014-08-161-0/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver adds support for the built-in accelereometer found on recent Toshiba laptops with HID TOS620A. This driver receives ACPI notify events 0x80 when the sensor detects a sudden move or a harsh vibration, as well as an ACPI notify event 0x81 whenever the movement or vibration has been stabilized. Also provides sysfs entries to get/set the desired protection level and reseting the HDD protection interface. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * asus-nb-wmi: Add wapf4 quirk for the U32UHans de Goede2014-08-161-0/+14
| | | | | | | | | | | | | | | | As reported here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1173681 the U32U needs wapf=4 too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * alienware-wmi: make hdmi_mux enabled on case-by-case basisMario Limonciello2014-08-161-2/+20
| | | | | | | | | | | | | | | | Not all HW supporting WMAX method will support the HDMI mux feature. Explicitly quirk the HW that does support it. Signed-off-by: Mario Limonciello <mario_limonciello@dell.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * ideapad-laptop: Constify DMI table and other r/o variablesMathias Krause2014-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | Constify the rfkill_blacklist[] DMI table, the ideapad_rfk_data[] table and the ideapad_attribute_group attribute group. There's no need to have them writeable during runtime. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * asus-nb-wmi.c: Rename x401u quirk to wapf4Hans de Goede2014-08-161-13/+13
| | | | | | | | | | | | | | | | | | The actual x401u does not use the so named x401u quirk but the x55u quirk. All that the x401u quirk does it setting wapf to 4, so rename it to wapf4 to stop the confusion. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * compal-laptop: correct invalid hwmon nameRoald Frederickx2014-08-161-1/+1
| | | | | | | | | | | | | | | | | | Change the name of the hwmon interface from "compal-laptop" to "compal". A dash is an invalid character for a hwmon name and caused the call to hwmon_device_register_with_groups() to fail. Signed-off-by: Roald Frederickx <roald.frederickx@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * toshiba_acpi: Add Qosmio X75-A to the alt keymap dmi listAzael Avalos2014-08-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | The Toshiba Qosmio X75-A series models also come with the new keymap layout. This patch adds this model to the alt_keymap_dmi list, along with an extra key found on these models. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * toshiba_acpi: Add extra check to backlight codeAzael Avalos2014-08-161-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Toshiba models (most notably Qosmios) come with an incomplete backlight method where the AML code doesn't check for write or read commands and always returns HCI_SUCCESS and the actual brightness (and in some cases the max brightness), thus allowing the backlight interface to be registered without write support. This patch changes the set_lcd_brightness function, checking the returned values for values greater than zero to avoid registering a broken backlight interface. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * Fix log message about future removal of interfaceMartin Kepplinger2014-08-161-3/+3
| | | | | | | | | | | | | | If this is going away, it won't be in 2012. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * ideapad-laptop: Disable touchpad interface on Yoga modelsHans de Goede2014-08-161-0/+27
| | | | | | | | | | | | | | | | Yoga models don't offer touchpad ctrl through the ideapad interface, causing ideapad_sync_touchpad_state to send wrong touchpad enable/disable events. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * asus-nb-wmi: Add wapf4 quirk for the X550CCHans de Goede2014-08-161-0/+9
| | | | | | | | | | | | | | | | As reported here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1173681 the X550CC needs wapf=4 too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * intel_ips: Make ips_mcp_limits variables staticMathias Krause2014-08-161-3/+3
| | | | | | | | | | | | | | | | These variables don't need to be visible outside of this compilation unit, make them static. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * thinkpad_acpi: Mark volume_alsa_control_{vol,mute} as __initdataMathias Krause2014-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | Mark volume_alsa_control_vol and volume_alsa_control_mute as __initdata, as snd_ctl_new1() will copy the relevant parts, so there is no need to keep the master copies around after initialization. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * fujitsu-laptop: Mark fujitsu_dmi_table[] DMI table as __initconstMathias Krause2014-08-161-5/+5
| | | | | | | | | | | | | | | | | | | | The DMI table is only ever used during initialization. Mark it as __initconst so its memory can be released afterwards -- roughly 1.5 kB. In turn, the callback functions can be marked with __init, too. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * hp-wmi: Add missing __init annotations to initialization codeMathias Krause2014-08-161-3/+3
| | | | | | | | | | | | | | | | These functions are only called from other initialization routines, so can be marked __init, too. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * hp_accel: Constify ACPI and DMI tablesMathias Krause2014-08-161-2/+2
| | | | | | | | | | | | | | | | | | Constify the lis3lv02d_device_ids[] ACPI and the lis3lv02d_dmi_ids[] DMI tables. There's no need to have them writeable during runtime. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * fujitsu-tablet: Mark DMI callbacks as __init codeMathias Krause2014-08-161-3/+3
| | | | | | | | | | | | | | | | | | The DMI table is already marked as __initconst, so can be the callback functions as they're only used in that context. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Robert Gerlach <khnz@gmx.de> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * dell-laptop: Mark dell_quirks[] DMI table as __initconstMathias Krause2014-08-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The dell_quirks[] DMI table is only ever used during initialization. Mark it as __initconst so its memory can be released afterwards -- roughly 5.7 kB. In turn, the callback function can be marked with __init, too. Also the touchpad_led_init() function can be marked __init as it's only referenced from dell_init() -- an __init function. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * eeepc-wmi: Constify asus_quirks[] DMI tableMathias Krause2014-08-161-1/+1
| | | | | | | | | | | | | | | | | | Constify the asus_quirks[] DMI table. There's no need to have it writeable during runtime. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * acer-wmi: Mark init data and code as suchMathias Krause2014-08-161-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Quite a lot of code and data of acer-wmi.c is only ever used during initialization. Mark those accordingly -- and constify, where appropriate -- so the memory can be released afterwards. All in all those changes move ~10 kB of code and data to the .init sections, marking them for release after initialization has finished. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: "Lee, Chun-Yi" <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * asus-nb-wmi: Constify asus_quirks[] DMI tableMathias Krause2014-08-161-1/+1
| | | | | | | | | | | | | | | | | | Constify the asus_quirks[] DMI table. There's no need to have it writeable during runtime. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * alienware-wmi: Mark DMI table as __initconstMathias Krause2014-08-161-2/+2
| | | | | | | | | | | | | | | | | | The DMI table is only ever used during initialization. Mark it as __initconst so its memory can be released appropriately. In turn, the callback function can be marked with __init, too. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * acer-wmi: Hide acer_{suspend,resume} for !CONFIG_PM_SLEEPMathias Krause2014-08-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Encapsulate acer_suspend() and acer_resume with #ifdef CONFIG_PM_SLEEP to get rid of the following warnings: ../acer-wmi.c:2046:12: warning: ‘acer_suspend’ defined but not used [-Wunused-function] ../acer-wmi.c:2068:12: warning: ‘acer_resume’ defined but not used [-Wunused-function] Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: "Lee, Chun-Yi" <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * acer-wmi: Mark acer_wmi_keymap[] as __initconstMathias Krause2014-08-161-1/+1
| | | | | | | | | | | | | | | | | | sparse_keymap_setup() will make a copy of the keymap, so we can release the master copy after initialization. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: "Lee, Chun-Yi" <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * MAINTAINERS: Update git URL for x86 platform driversMathias Krause2014-08-161-1/+1
| | | | | | | | | | | | | | | | The repo on kernel.org is no longer available but has a replacement at cavan.codon.org.uk. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
| * WMI: Remove unnecessary null testHimangi Saraogi2014-08-161-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the null test on block. block is initialized at the beginning of the function to &wblock->gblock. Since wblock is dereferenced prior to the null test, wblock must be a valid pointer, and &wblock->gblock cannot be null. The following Coccinelle script is used for detecting the change: @r@ expression e,f; identifier g,y; statement S1,S2; @@ *e = &f->g <+... f->y ...+> *if (e != NULL || ...) S1 else S2 Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
OpenPOWER on IntegriCloud