From nobody Sat Apr 09 21:48:20 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 99D981A8AE2D; Sat, 9 Apr 2022 21:48:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KbTJP0GZ9z4dGQ; Sat, 9 Apr 2022 21:48:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649540901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dkdM4Gg4icN0s3HNR4pAFZfv+bR3RIUrdvzfV1Jc4PY=; b=rdg1e1o9lenp23y/2Pf8yO3Tu+Ae/JQKDO7omgG7LDSoGlzn4OUEpruwiVL4WNFng66M6f 23xXLahbhOYuAdN7E2aRyPcRe8W0m674GOCsLAeecgYSg01GQeFd5W9rsa9UN7aEHZm64e pGUL6Few5//HxRM8KoPCrUk/eR2rIXWXL2YqQMVdpjTOdSBFzPlXZsATuMP7SROB0FJ3iy WKxHVN9FD0p6S/0N9TaDcGEKjT4caylUI5UJcoh1WUNftY4qWhhAVeCKcopYpul0fntHEq pYj41rSMpG6H0/c8j1HK3wjt3W5RkyFg1puGQ/L4TuTD+5suVcJ3X8lk05fHbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA548215ED; Sat, 9 Apr 2022 21:48:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 239LmKU8093065; Sat, 9 Apr 2022 21:48:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 239LmKqj093064; Sat, 9 Apr 2022 21:48:20 GMT (envelope-from git) Date: Sat, 9 Apr 2022 21:48:20 GMT Message-Id: <202204092148.239LmKqj093064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6ead1379fd42 - main - sys/user.h: Add kinfo_lockf structure to report advisory locks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ead1379fd42d96b57d58d338dae10b2e73fd8d8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649540901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dkdM4Gg4icN0s3HNR4pAFZfv+bR3RIUrdvzfV1Jc4PY=; b=IbYCwdV2GP0glMcE2ngM3nmQCgH9EFwH6LAsFRCmDsI9uyy40QwJjDR2YPmBmy1jUwceqS lZ3mbAFtMmWYLU53h8t6NjUrh4s0efHhyWOuilDk6xLIKkFE0sBEutlJ4n505Ye702oI7a I1fBqmC6zM97xSts/2dvjaNIBPuE5aZZJSnaiEiom9idnvcwTkYt46God81YJPd7Aq6BEl 1+w/77/7R7DF+vyaqdmaDRB6sA78X8TQVg0haMVa9ezhhAWL7cjJj2xk+UB8TuqRShx/cD w+/KwpCPNVgJUB3Fkmd9BL++XPFqbs0zFQVq6f8gZbGiEsgAbwwdad8GZq+jiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649540901; a=rsa-sha256; cv=none; b=uK9irzwrQlQ7yMH6J4BMDogGC1ww9ETY0HyWcgG3QV7cU7GIYR4hxjA4d+NxuwtWQpIzPD zno29I49Uzkw1ZwEH/yf9uaxacToo5QEWK/fl7CiBcJbQ/ue9UOoqHmaYWkMABP6ERBmN3 q/RQ0QtkwtNl+DYdPlpWkBJt7gA7fo/e3gCUhYBF4IFSTFVaA4uvqZozeCMoERy3dJGvyS VTLUHsGdqhWNyYFYXr1juc+PNGM4kHWIYEMOe+BMciSuWiiQXZc29nPGWoXHO/8tMp3Fc9 2nKUd6zBoS09akGo9HTSjmMaZrfEvQNAVUGCxgx4E+mIo40yXvNQSVe2gg6C5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6ead1379fd42d96b57d58d338dae10b2e73fd8d8 commit 6ead1379fd42d96b57d58d338dae10b2e73fd8d8 Author: Konstantin Belousov AuthorDate: 2022-04-01 21:19:35 +0000 Commit: Konstantin Belousov CommitDate: 2022-04-09 21:43:53 +0000 sys/user.h: Add kinfo_lockf structure to report advisory locks Reviewed by: markj, rmacklem Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34756 --- sys/sys/user.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sys/sys/user.h b/sys/sys/user.h index f57a69aed13e..cf64f8e8eda4 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -452,6 +452,28 @@ struct kinfo_file { char kf_path[PATH_MAX]; /* Path to file, if any. */ }; +struct kinfo_lockf { + int kl_structsize; /* Variable size of record. */ + int kl_rw; + int kl_type; + int kl_pid; + int kl_sysid; + int kl_pad0; + uint64_t kl_file_fsid; + uint64_t kl_file_rdev; + uint64_t kl_file_fileid; + off_t kl_start; + off_t kl_len; /* len == 0 till the EOF */ + char kl_path[PATH_MAX]; +}; + +#define KLOCKF_RW_READ 0x01 +#define KLOCKF_RW_WRITE 0x02 + +#define KLOCKF_TYPE_FLOCK 0x01 +#define KLOCKF_TYPE_PID 0x02 +#define KLOCKF_TYPE_REMOTE 0x03 + /* * The KERN_PROC_VMMAP sysctl allows a process to dump the VM layout of * another process as a series of entries.