- 01 Jul, 2015 32 commits
-
-
Miklos Szeredi authored
When the connection is aborted it is possible that request_end() will be called twice. Use atomic test and set to do the actual ending only once. test_and_set_bit() also provides the necessary barrier semantics so no explicit smp_wmb() is necessary. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
When an unlocked request is aborted, it is moved from fpq->io to a private list. Then, after unlocking fpq->lock, the private list is processed and the requests are finished off. To protect the private list, we need to mark the request with a flag, so if in the meantime the request is unlocked the list is not corrupted. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Add a fpq->lock for protecting members of struct fuse_pqueue and FR_LOCKED request flag. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Rearrange fuse_abort_conn() so that processing queue accesses are grouped together. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
- locked list_add() + list_del_init() cancel out - common handling of case when request is ended here in the read phase Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz>
-
Miklos Szeredi authored
This will allow checking ->connected just with the processing queue lock. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
This is just two fields: fc->io and fc->processing. This patch just rearranges the fields, no functional change. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
wait_event_interruptible_exclusive_locked() will do everything request_wait() does, so replace it. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Remove fc->lock protection from input queue members, now protected by fiq->waitq.lock. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Interrupt is only queued after the request has been sent to userspace. This is either done in request_wait_answer() or fuse_dev_do_read() depending on which state the request is in at the time of the interrupt. If it's not yet sent, then queuing the interrupt is postponed until the request is read. Otherwise (the request has already been read and is waiting for an answer) the interrupt is queued immedidately. We want to call queue_interrupt() without fc->lock protection, in which case there can be a race between the two functions: - neither of them queue the interrupt (thinking the other one has already done it). - both of them queue the interrupt The first one is prevented by adding memory barriers, the second is prevented by checking (under fiq->waitq.lock) if the interrupt has already been queued. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz>
-
Miklos Szeredi authored
Use fiq->waitq.lock for protecting members of struct fuse_iqueue and FR_PENDING request flag, previously protected by fc->lock. Following patches will remove fc->lock protection from these members. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Different lists will need different locks. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Rearrange fuse_abort_conn() so that input queue accesses are grouped together. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
This will allow checking ->connected just with the input queue lock. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
The input queue contains normal requests (fc->pending), forgets (fc->forget_*) and interrupts (fc->interrupts). There's also fc->waitq and fc->fasync for waking up the readers of the fuse device when a request is available. The fc->reqctr is also moved to the input queue (assigned to the request when the request is added to the input queue. This patch just rearranges the fields, no functional change. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Use flags for representing the state in fuse_req. This is needed since req->list will be protected by different locks in different states, hence we'll want the state itself to be split into distinct bits, each protected with the relevant lock in that state. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz>
-
Miklos Szeredi authored
FUSE_REQ_INIT is actually the same state as FUSE_REQ_PENDING and FUSE_REQ_READING and FUSE_REQ_WRITING can be merged into a common FUSE_REQ_IO state. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Only hold fc->lock over sections of request_wait_answer() that actually need it. If wait_event_interruptible() returns zero, it means that the request finished. Need to add memory barriers, though, to make sure that all relevant data in the request is synchronized. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz>
-
Miklos Szeredi authored
Since it's a 64bit counter, it's never gonna wrap around. Remove code dealing with that possibility. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Splice fc->pending and fc->processing lists into a common kill list while holding fc->lock. By the time we release fc->lock, pending and processing lists are empty and the io list contains only locked requests. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Fold end_io_requests() and end_queued_requests() into fuse_abort_conn(). Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Reuse req->waitq.lock for protecting FR_ABORTED and FR_LOCKED flags. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Finer grained locking will mean there's no single lock to protect modification of bitfileds in fuse_req. So move to using bitops. Can use the non-atomic variants for those which happen while the request definitely has only one reference. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
- don't end the request while req->locked is true - make unlock_request() return an error if the connection was aborted Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
fuse_abort_conn() does all the work done by fuse_dev_release() and more. "More" consists of: end_io_requests(fc); wake_up_all(&fc->waitq); kill_fasync(&fc->fasync, SIGIO, POLL_IN); All of which should be no-op (WARN_ON's added). Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
And the same with fuse_request_send_nowait_locked(). Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
fc->conn_error is set once in FUSE_INIT reply and never cleared. Check it in request allocation, there's no sense in doing all the preparation if sending will surely fail. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Move accounting of fc->num_waiting to the point where the request actually starts waiting. This is earlier than the current queue_request() for background requests, since they might be waiting on the fc->bg_queue before being queued on fc->pending. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
Reset req->waiting in fuse_put_request(). This is needed for correct accounting in fc->num_waiting for reserved requests. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz>
-
Miklos Szeredi authored
request_end() expects fc->num_background and fc->active_background to have been incremented, which is not the case in fuse_request_send_nowait() failure path. So instead just call the ->end() callback (which is actually set by all callers). Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Reviewed-by:
Ashish Samant <ashish.samant@oracle.com>
-
Miklos Szeredi authored
fc->release is called from fuse_conn_put() which was used in the error cleanup before fc->release was initialized. [Jeremiah Mahler <jmmahler@gmail.com>: assign fc->release after calling fuse_conn_init(fc) instead of before.] Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Fixes: a325f9b9 ("fuse: update fuse_conn_init() and separate out fuse_conn_kill()") Cc: <stable@vger.kernel.org> #v2.6.31+
-
- 22 Jun, 2015 1 commit
-
-
Linus Torvalds authored
-
- 21 Jun, 2015 1 commit
-
-
git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds authored
Pull scsi target fixes from Nicholas Bellinger: "Apologies for the late pull request. Here are the outstanding target-pending fixes for v4.1 code. The series contains three patches from Sagi + Co that address a few iser-target issues that have been uncovered during recent testing at Mellanox. Patch #1 has a v3.16+ stable tag, and #2-3 have v3.10+ stable tags" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: iser-target: Fix possible use-after-free iser-target: release stale iser connections iser-target: Fix variable-length response error completion
-
- 20 Jun, 2015 1 commit
-
-
git://people.freedesktop.org/~airlied/linuxLinus Torvalds authored
Pull drm fixes from Dave Airlie: "A smattering of fixes, mgag200: don't accept modes that aren't aligned properly as hw can't do it i915: two regression fixes radeon: one query to allow userspace fixes one oops fixer for older hw with new options enabled" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon: don't probe MST on hw we don't support it on drm/radeon: Add RADEON_INFO_VA_UNMAP_WORKING query drm/mgag200: Reject non-character-cell-aligned mode widths Revert "drm/i915: Don't skip request retirement if the active list is empty" drm/i915: Always reset vma->ggtt_view.pages cache on unbinding
-
- 19 Jun, 2015 5 commits
-
-
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linuxLinus Torvalds authored
Pull clk fixes from Michael Turquette: "Very late clk regression fixes for the ARM-based AT91 platform. These went unnoticed by me until recently, hence the late pull request" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: at91: fix h32mx prototype inclusion in pmc header clk: at91: trivial: typo in peripheral clock description clk: at91: fix PERIPHERAL_MAX_SHIFT definition clk: at91: pll: fix input range validity check
-
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/soundLinus Torvalds authored
Pull sound fixes from Takashi Iwai: "Nothing looks scary, just a few usual HD-audio regression fixes and fixup, in addition to a minor Kconfig dependency fix for the old MIPS drivers" * tag 'sound-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix unused label skip_i915 ALSA: hda - Fix noisy outputs on Dell XPS13 (2015 model) ALSA: mips: let SND_SGI_O2 select SND_PCM ALSA: hda - Fix audio crackles on Dell Latitude E7x40 ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine
-
-
Nicolas Ferre authored
Trivial fix that prevents to compile this pmc clock driver if h32mx clock is present but smd clock isn't. Signed-off-by:
Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by:
Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by:
Alexandre Belloni <alexandre.belloni@free-electrons.com> Fixes: bcc5fd49 ("clk: at91: add a driver for the h32mx clock") Cc: <stable@vger.kernel.org> # 3.18+
-
Nicolas Ferre authored
Signed-off-by:
Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by:
Boris Brezillon <boris.brezillon@free-electrons.com>
-