Lines Matching +full:device +full:- +full:unique
1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
76 * iget_test - whether or not the inode with matched hashval is the one we are
88 WARN_ON(ia->ino.domain < DOMAIN_ROOT || in iget_test()
89 ia->ino.domain >= DOMAIN_INVALID); in iget_test()
91 if ((read_ino_domain(inode->i_ino) == DOMAIN_ROOT) || in iget_test()
92 (read_ino_domain(inode->i_ino) != ia->ino.domain)) in iget_test()
95 switch (ia->ino.domain) { in iget_test()
98 res = (ia->lo_i == hii->lower_inode); in iget_test()
101 res = (ia->lo_i == hii->lower_inode); in iget_test()
104 res = (ia->peer == hii->conn && in iget_test()
105 ia->remote_ino == hii->remote_ino); in iget_test()
108 res = (ia->cloud_record_id && in iget_test()
109 (memcmp(ia->cloud_record_id, hii->cloud_record_id, in iget_test()
111 (ia->reserved[0] == hii->reserved[0])); in iget_test()
119 * iget_set - initialize a inode with iget_args
129 inode->i_ino = ia->ino.ino_output; in iget_set()
132 hii->conn = ia->peer; in iget_set()
133 hii->remote_ino = ia->remote_ino; in iget_set()
134 hii->lower_inode = ia->lo_i; in iget_set()
136 if (ia->cloud_record_id) { in iget_set()
137 memcpy(hii->cloud_record_id, ia->cloud_record_id, CLOUD_RECORD_ID_LEN); in iget_set()
138 memcpy(hii->reserved, ia->reserved, CLOUD_DENTRY_RESERVED_LENGTH); in iget_set()
158 * hmdfs_iget5_locked_merge - obtain an inode for the merge-view
181 ia.ino.ino_raw = d_inode(fst_lo_d)->i_ino; in hmdfs_iget5_locked_merge()
182 ia.ino.dev_id = hmdfs_d(fst_lo_d)->device_id; in hmdfs_iget5_locked_merge()
203 ia.ino.ino_raw = d_inode(fst_lo_d)->i_ino; in hmdfs_iget5_locked_cloud_merge()
204 ia.ino.dev_id = hmdfs_d(fst_lo_d)->device_id; in hmdfs_iget5_locked_cloud_merge()
210 * hmdfs_iget5_locked_local - obtain an inode for the local-dev-view
233 ia.ino.ino_raw = make_ino_raw_dev_local(lo_i->i_ino); in hmdfs_iget5_locked_local()
240 * hmdfs_iget5_locked_remote - obtain an inode for the remote-dev-view
243 * @peer: corresponding device node
248 * Note that currenly implementation assume the each remote inode has unique
249 * ino. Thus the combination of the peer's unique dev_id and the remote_ino
250 * is enough to determine a unique remote inode.
270 ia.ino.dev_id = peer->device_id; in hmdfs_iget5_locked_remote()
276 * hmdfs_iget5_locked_cloud - obtain an inode for the cloud-dev-view
279 * @peer: corresponding device node
284 * Note that currenly implementation assume the each remote inode has unique
285 * ino. Thus the combination of the peer's unique dev_id and the remote_ino
286 * is enough to determine a unique remote inode.
296 .cloud_record_id = res->record_id, in hmdfs_iget5_locked_cloud()
297 .reserved = res->reserved, in hmdfs_iget5_locked_cloud()
306 ia.ino.ino_raw = make_ino_raw_cloud(res->record_id) + res->reserved[0]; in hmdfs_iget5_locked_cloud()
307 ia.ino.dev_id = peer->device_id; in hmdfs_iget5_locked_cloud()
322 .ino.dev_id = peer ? peer->device_id : 0, in hmdfs_iget_locked_root()