From: Shaun Tancheff Date: Mon, 25 Nov 2024 11:39:23 +0000 (+0700) Subject: LU-18486 build: fl_flags removed in 6.8 X-Git-Tag: 2.16.51~74 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5f512319d45c43a111aeaf6f1668c4ad65fe8ecd;p=fs%2Flustre-release.git LU-18486 build: fl_flags removed in 6.8 Linux commit v6.7-rc4-79-gaf7628d6ec19 fs: convert error_remove_page to error_remove_folio Provide an abstraction for fl_flags and c.flc_flags Make mdt_dom_fiemap a static function. Test-Parameters: trivial Fixes: 3177b0dc5d1 ("LU-2525 ldlm: add asynchronous flocks") Fixes: 5921e1571f2 ("LU-14510 dom: fiemap support for DoM files") Signed-off-by: Shaun Tancheff Change-Id: Icb659a8ab19c00454391cbb7df31c2bb7f9a85c4 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57123 Tested-by: jenkins Tested-by: Shuichi Ihara Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index c3e2036..69edde8 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -5290,15 +5290,14 @@ static int ll_file_flock_lock(struct file *file, struct file_lock *file_lock) * on the server. * 2. unlock - never conflicts with anything. */ - file_lock->fl_flags &= ~FL_SLEEP; + file_lock->C_FLC_FLAGS &= ~FL_SLEEP; #ifdef HAVE_LOCKS_LOCK_FILE_WAIT rc = locks_lock_file_wait(file, file_lock); #else - if (file_lock->fl_flags & FL_FLOCK) { + if (file_lock->C_FLC_FLAGS & FL_FLOCK) rc = flock_lock_file_wait(file, file_lock); - } else if (file_lock->fl_flags & FL_POSIX) { + else if (file_lock->C_FLC_FLAGS & FL_POSIX) rc = posix_lock_file(file, file_lock, NULL); - } #endif /* HAVE_LOCKS_LOCK_FILE_WAIT */ if (rc) CDEBUG_LIMIT(rc == -ENOENT ? D_DLMTRACE : D_ERROR, @@ -5571,7 +5570,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) flags == LDLM_FL_BLOCK_NOWAIT /* F_SETLK/F_SETLK64 */) { cb_data->fa_notify = file_lock->fl_lmops->lm_grant; - flags = (file_lock->fl_flags & FL_SLEEP) ? + flags = (file_lock->C_FLC_FLAGS & FL_SLEEP) ? 0 : LDLM_FL_BLOCK_NOWAIT; einfo.ei_cb_cp = ll_flock_completion_ast_async; get_file(file); @@ -5592,7 +5591,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) * with reordering of unlock & lock responses from * server. */ - cb_data->fa_flc.fl_flags |= FL_EXISTS; + cb_data->fa_flc.C_FLC_FLAGS |= FL_EXISTS; rc = ll_file_flock_lock(file, &cb_data->fa_flc); if (rc) { if (rc == -ENOENT) { diff --git a/lustre/mdt/mdt_io.c b/lustre/mdt/mdt_io.c index 73c7bce..55ebde6 100644 --- a/lustre/mdt/mdt_io.c +++ b/lustre/mdt/mdt_io.c @@ -1096,8 +1096,8 @@ static int dom_has_zero_regions(struct fiemap *fiemap) return begin < (fiemap->fm_start + fiemap->fm_length); } -int mdt_dom_fiemap(const struct lu_env *env, struct mdt_device *mdt, - const struct lu_fid *fid, struct fiemap *fiemap) +static int mdt_dom_fiemap(const struct lu_env *env, struct mdt_device *mdt, + const struct lu_fid *fid, struct fiemap *fiemap) { struct mdt_object *mo; int rc;